itjc.net

how to keep Linux systems up to date

If you've spent much time with your Linux box, hopefully you already know how to keep it up to date. Thankfully, its really easy to do from the command line. This post will show how to do this on Debian based systems, which use "aptitude", and the cli gui "apt-get". It will also show the command for ArchOS based systems, which use "pacman". Red Hat and like systems such as CentOS use "yum". I don't remember the syntax, but you can easily look it up with "man".

Note the common convention, commands preceded by $ are run by the user, while commands preceded by # must be run as root. I beleive that system update and upgrades must be run as root.

Arch:
# pacman -Syu
This command both updates the package list,and installs all updates, in one clean and simple command.

Debian based (Such as Ubuntu, or any of its derivatives):
# apt-get update
This will update the package lists.
# apt-get upgrade
This will upgrade all packages to the newest version.
# apt-get dist-upgrade
This will upgrade the Os to the latest major release.

Backtrack is based on Ubuntu. Therefore, the commands to update are the same. However, there are usually some other things you want to keep updated as well on Backtrack, and so I generally write the following script on each clean backtrack install I make:

#!/bin/bash
apt-get update
apt-get upgrade
apt-get dist-upgrade
msfupdate
cd /pentest/exploits/set && svn update . && cd ~
echo "done"

This will update the system, as well as keep the SET and Metasploit frameworks up to date. You can call the script whatever you want, as long as it has the ".sh" extension. Then you can call it via "sh script.sh", and it will run all the commands for you.


options

 

TeamViewer for Remote Support Remote Support