Softwares are often referred as packages in Linux. There are a few ways to install new packages. Some packages can be downloaded on websites, but most are done by apt-get. Many popular packages are listed on the source lists and can be downloaded directly over command line. apt-get can also update existing packages and deal with dependency.
Right after install the system, it’s always good to check any updates available. This is also recommended before you install any packages for the first time of the day. The update command for all apt-get packages is:
sudo apt-get update
sudo apt-get upgrade
Note that these two commands are not the same. Update is to update the source list only (check for newer version) and upgrade is the actual installation of newer version of packages. Both lines need to be executed and in order, i.e. first update then upgrade.
However, upgrade will not deal with dependency, so sometimes it would say a few packages are not upgraded. This means there are new packages require to install before upgrade existing ones. If that’s the case and you really want to upgrade, use dist-upgrade:
sudo apt-get dist-upgrade
To install new packages, execute the following command:
sudo apt-get install <package name>
And to uninstall packages, execute the following command:
sudo apt-get remove <package name>
Make sure the package name is as exact or you will receive an error. If you’re not sure, type in the first few characters and hit tab to see all matches.
Apart from apt-get, curl and wget are sometimes used to install as well. They are more like a command line downloader. For the use of curl and wget, it’s better to copy the command from the developer’s website to avoid errors.