-
Notifications
You must be signed in to change notification settings - Fork 1
Routine Software Management
Ubuntu (and Linux systems in general) utilize package managers to manage software installation, dependencies, etc.
(FYI, conda
is also a package manager.)
On Ubuntu, there are several software interfaces which may be used to manage software, but the preferred choice is currently apt
.
Packages are typically installed system-wide, and so required elevated (administrator) privilege, so most package commands will need to be run preceded by sudo
("switch user and do") and then enter the administrator password.
You should routinely update your machine by running the following commands:
sudo apt update
sudo apt upgrade
-
sudo apt autoremove
Respectively, these update the database (get the current package list), install new or improved versions of the packages on your system, and remove old installed packages that are no longer needed.
You can submit multiple commands at once using &&
between the commands, e.g. sudo apt update && sudo apt upgrade && sudo apt autoremove
.
Then, if you want to further simplify your life, you could add an alias to your .bashrc
for running these three commands, i.e. alias ubup='sudo apt update && sudo apt upgrade && sudo apt autoremove'
The installed software repositories have a lot of optional software which you may install from the command line.
As an example, consider the editor vim
.
To install it, run sudo apt install vim
.
apt
will search the installed repositories for the package vim
and also determine what other software is needed to install it on your machine before presenting you with a solution: packages to be installed (vim
) and additional packages which must be installed as dependencies.
Perhaps you then later want to remove vim
- just run sudo apt remove vim
Some packages (software applications) are available in multiple places.
Use the installed system repositories first since this is the cleanest way to manage your software.
If you want to look for something, you can use the command line search functionality apt search _keyword_
or check the pkgs.org where you may select and search based on your distribution, architecture, and desired repositories (try to stick to official ones if you don't know details!).
The site also offers instructions on how to install packages and repositories.