Friday, October 9, 2015

Step by Step Guide to Install Software on Ubuntu using apt-get

When you wish to install new software on Ubuntu, you can open up Ubuntu Software Center and choose from. However, this is slow especially if you are running Ubuntu as a virtual machine. Here is an easy way to get software using terminal.


Open up terminal. Enter the following commands
$ sudo apt-get update
$ sudo apt-get install vim
Vim is a text editor that is beloved by many Unix users. The above commands will first update the package list, and install vim. It will ask whether to install the vim package, so confirm it by entering y. In a moment, it will complete the installation.


I sometimes program in c++, and but Ubuntu does not come with g++. I can easily install it via
$ sudo apt-get install g++


I will be ssh'ing into this guest OS, so I might as well install openssh-server
$ sudo apt-get install openssh-server
Note that there is a 'tab' completion feature here too. Press the Tab keystroke after openssh, and it will automatically add in the dash -. If you double press the Tab key again, it will show the complete list of packages with the name openssh-.


I might as well try installing the client
$ sudo apt-get install openssh-client
In fact, this package is already installed, so it will simply upgrade the software.


I might as well upgrade all the packages
$ sudo apt-get upgrade


If you are curious as to what options you have, type in
$ apt-get --help

No comments:

Post a Comment