Announcement

Collapse
No announcement yet.

Kubuntu General Consensus on Updating?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by jlittle View Post
    The apt-get commands are still to be used in scripts, because their outputs are promised to be stable, and the apt commands' outputs may change in the future.
    Yes, I did read up on this the other day.
    Dell OptiPlex 9010 SFF, 8GB RAM, i7 3770, Kubuntu 18.04, MB 051FJ8

    Comment


      #17
      Originally posted by oshunluvr View Post
      I use the command line to upgrade. My method:

      #1 Create a file in /etc/sudoers.d/ to make "apt" usable by me without using my password every time.
      #2 Edit ~/.bash_aliases and alias the most used apt/apt-get commands to one-word commands.
      #3 Install yakuake so I have a drop-down terminal to do my updates in.

      #1 looks like this:
      Code:
      stuart office.smith.lan = (root) NOPASSWD: /usr/bin/apt-get,/usr/bin/apt,/usr/bin/add-apt-repository,/usr/bin/apt-add-repository
      #2 looks like this:
      Code:
      alias aptlist='sudo apt list'
      alias aptsearch='sudo apt search'
      alias aptshow='sudo apt show'
      alias instal='sudo apt install'
      alias remove='sudo apt remove'
      alias purge='sudo apt-get purge'
      alias update='sudo apt update; sudo apt list --upgradable'
      alias upgrade='sudo apt full-upgrade'
      alias aremove='sudo apt-get autoremove'
      #3 means I need only hit F12 and I have a terminal at my fingertips.
      That's brilliant oshunluvr but most of it don't mean anything to me LOL. I looked some of it up but without understanding the mechanics of it all I'm lost. I have used some of those commands in the past but not in conjunction with Updating.

      I would think 'update' would imply 'list' and 'search' for starters. Linux Terminal is incredible!
      Last edited by Snowhog; May 16, 2022, 10:39 AM.
      Dell OptiPlex 9010 SFF, 8GB RAM, i7 3770, Kubuntu 18.04, MB 051FJ8

      Comment


        #18
        Again, utilize konsole and type: man apt-get (or apt) and review what update does. The begining of wisdom is the aquisition of knowledge.
        Using Kubuntu Linux since March 23, 2007
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #19
          Originally posted by oshunluvr View Post
          I use the command line to upgrade. My method:

          #1 looks like this:
          Code:
          stuart office.smith.lan = (root) NOPASSWD: /usr/bin/apt-get,/usr/bin/apt,/usr/bin/add-apt-repository,/usr/bin/apt-add-repository
          oshunluvr,

          Could you clarify/explain this command a bit more, please?
          Last edited by Snowhog; May 16, 2022, 10:39 AM.
          If you think Education is expensive, try ignorance.

          The difference between genius and stupidity is genius has limits.

          Comment


            #20
            See Sudoers Manual and scroll down to PASSWD and NOPASSWD
            Using Kubuntu Linux since March 23, 2007
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #21
              Originally posted by Snowhog View Post
              Again, utilize konsole and type: man apt-get (or apt) and review what update does. The begining of wisdom is the aquisition of knowledge.
              I do, but sometimes lost in the terminology.
              Dell OptiPlex 9010 SFF, 8GB RAM, i7 3770, Kubuntu 18.04, MB 051FJ8

              Comment


                #22
                Originally posted by SpecialEd View Post
                oshunluvr,

                Could you clarify/explain this command a bit more, please?
                It used to be that you edited /etc/sudoers file to gain root level access for specific things. Now one creates a separate file in /etc/sudoers.d/ and inserts whatever commands one would like to use. The uses are many - for example you can do as I have - allow a specific user to run a root command without a password - or you could allow a non-admin user to have some limited access to specific functions or programs instead of giving that user full sudo rights - or you can make a specific command usable by everyone whether or not they have sudo rights.

                I have created 3 files for me - one each for pwrstat (UPS control and reports), loadkeys (to modify my keyboard in TTY mode), and apt/apt-get (to install and update my system).

                Specifically to my above entry;

                stuart = username
                office.smith.lan = the fully qualified hostname of my desktop computer
                (root) NOPASSWD: = allow the following list of commands to run as root without requiring a password

                and the rest are the commands that I've allowed myself to use with having to enter my password. Basically this means I can enter:

                sudo apt update

                or use the other commands listed and I do not get a password prompt.

                Please Read Me

                Comment


                  #23
                  Originally posted by Snowhog View Post
                  See Sudoers Manual and scroll down to PASSWD and NOPASSWD
                  Thanks for the link Snowhog, some interesting stuff there.
                  If you think Education is expensive, try ignorance.

                  The difference between genius and stupidity is genius has limits.

                  Comment


                    #24
                    Originally posted by oshunluvr View Post
                    It used to be that you edited /etc/sudoers file to gain root level access for specific things. Now one creates a separate file in /etc/sudoers.d/ and inserts whatever commands one would like to use. The uses are many - for example you can do as I have - allow a specific user to run a root command without a password - or you could allow a non-admin user to have some limited access to specific functions or programs instead of giving that user full sudo rights - or you can make a specific command usable by everyone whether or not they have sudo rights.

                    I have created 3 files for me - one each for pwrstat (UPS control and reports), loadkeys (to modify my keyboard in TTY mode), and apt/apt-get (to install and update my system).

                    Specifically to my above entry;

                    stuart = username
                    office.smith.lan = the fully qualified hostname of my desktop computer
                    (root) NOPASSWD: = allow the following list of commands to run as root without requiring a password

                    and the rest are the commands that I've allowed myself to use with having to enter my password. Basically this means I can enter:

                    sudo apt update

                    or use the other commands listed and I do not get a password prompt.
                    Thanks oshunluvr. Is there a naming protocol for the file(s) you create in sudoers.d?
                    If you think Education is expensive, try ignorance.

                    The difference between genius and stupidity is genius has limits.

                    Comment


                      #25
                      Read through https://superuser.com/questions/8691...dit-it/1027257
                      Using Kubuntu Linux since March 23, 2007
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #26
                        Not that I'm aware of, but you're supposed to use visudo to edit the files just like the old sudoers file.

                        Please Read Me

                        Comment


                          #27
                          Nice. I just created my own file (paul) in /etc/sudoers.d/ with: sudo visudo -f /etc/sudoers.d/paul

                          The only hiccup, if you can call it that, is that when you go to save the file, it wants to add .tmp to the file name, and you need to remove the .tmp. You'll then be asked if you want to save with a new name. Answer Y and then you'll be prompted if you want to overwrite the file. Answer Y. To see the contents, type: sudo cat /etc/sudoers.d/nameoffile
                          Using Kubuntu Linux since March 23, 2007
                          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                          Comment


                            #28
                            Thanks guys, works like a charm.
                            If you think Education is expensive, try ignorance.

                            The difference between genius and stupidity is genius has limits.

                            Comment

                            Working...
                            X