Ubuntu will automatically tell you when updates are available for the operating system and other software. Years ago, GNU/Linux users had to use the terminal to enter commands when they wanted to update their operating system. Tasks like these prompted casual computer users to use operating systems that were easier to update. As the popularity of GNU/Linux began to make its way onto the desktops of less-advanced computer users, graphical interfaces began popping up that would allow users to easily update their system software.
As a Debian-based operating system, Ubuntu uses Update Manager as a graphical interface. Alert will pop up on the desktop screen whenever there are updates that the operating system feels you need to attend to.
While Ubuntu will notify you of important updates, at times you may want to manually check to see if there is anything available to be updated. Should you feel the need to start the Update Manager yourself, simply click System Administration Update Manager. This will start Ubuntu searching the software repositories for updates. This is good practice should your automatic update fail or report errors when trying to update any of the software packages.
Running the Update Manager can take some time, especially if you have 391 updates available. So you may want to set the Update Manager to run when you won’t likely be using the computer. To do this, you need to use the terminal to edit what is called the crontab file. A crontab file is a text file that contains a list of commands that run at specific times set in the crontab file. These files run in the background at their specified time. If you set commands to run through the crontab file, it is always good to make sure they are running by checking the log files. More of this will be covered later in the book. Remember, editing the crontab file to run the Update Manager is strictly an optional task. If you feel intimidated by editing commands through the terminal at this point, skip the rest of this section and move on to the next. Don’t worry if you opt for this. Plenty of GNU/Linux users never touch the crontab files, and their systems work just fine! So if you are ready to dive into the crontab editor, let’s roll up our sleeves and start to get dirty.
The first step you need to take is to open the Terminal window. This can be done by going to Applications Accessories Terminal.
In the Terminal window, you should see something similar to the jeff@jeffdesktop:~$. Jeff is the user who is currently logged in, and jeff-desktop is the name of the computer itself. After the $ is where we will begin to enter the basic commands to bring up the crontab editor. Go ahead and type the following into your terminal:
sudo gedit /root/.crontab
The name of the sudo command is short for “super user do.” This allows you, a user on the computer, to run programs and commands with the security privileges of the computer’s super user. If you leave this piece of the command out, you will not be able to save any editing you do. gedit simply means edit. The /root/.crontab is the file you will be editing.
After you enter this command in the terminal, press ENTER. You should now be asked for your password. Use the same one you have set up for your account. When you enter this password, nothing will show up as you type. This is typical of a GNU/Linux system dating back to its Unix days. This is a security feature that prevents people from looking over your shoulder to see how many characters your password has. These “shoulder surfers” could make an educated guess at your password with this knowledge. Again, after you enter your password, press ENTER. After waiting a couple of seconds, you should see the crontab editor open up. Click the editor’s window to make sure you have a cursor and type the following:
00 00 * * * /usr/bin/apt-get update && /usr/bin/apt-get upgrade -y
Let’s analyze this before we save our changes. The command starts with a series of zeros. These tell the crontab file at what time to run the command. Thus, 00 00 would mean 12:00 A.M. If you wanted to set the time to run this file at 4:30 P.M., the command should read 16 30. The three asterisks following the time give us the ability to control the date, month, and/or day of the week. The date can contain a value from 1 to 31, the month can range from 1 to 12, and the day of the week can be set between 0 and 6, with 0 being a Sunday. The asterisk means run every day.
The rest of the command tells the operating system what to do and where to do it. The file location is /usr/bin, and apt-get is the actual program that runs to update and upgrade your software. Update Manager is the graphical user interface for the update/upgrade portion of the apt-get program. The -y means answer yes to any questions that may be asked during the process.
If you wish to leave your command to run at 12:00 A.M., then you can leave your file alone at this point and select File Save. If you wish to set a different time, or even to adjust the date, go ahead and adjust this and then save your file. Once this file has been saved, you can close your crontab editor and your terminal, and then take pride that you once again have journeyed into the depths of GNU/Linux and lived to tell about it! But be careful, when you work more and more in the terminal, you really begin to feel how much control you have over your operating system. After a while, you may find yourself ignoring the graphical interfaces in Ubuntu and beginning to make the terminal your tool of choice!
By now, you have probably noticed update, which can be associated with patches, fixes, and added features to various software packages, and upgrade. An upgrade is when you move from one version of an operating system or other software to the latest distribution release, or when patches to the software are applied. The Ubuntu Update Manager’s graphical interface will handle this for you as well. Whether you are responding to a notice from Ubuntu that updates are available, or you have manually started the Update Manager, if an upgrade for the operating system is available, you will see a box pop up.
It is important to remember that this image was taken from a computer running the 7.04 Feisty Fawn and upgrading to the 7.10 release of Gutsy Gibbon. When you are upgrading your Ubuntu distribution, the release numbers will most likely be different to reflect the newest versions of the software.
Source of Information : McGraw Hill Osborne Media How to Do Everything Ubuntu
No comments:
Post a Comment