So this post is only for the linux users as you are already aware, reading the title. Installing softwares on a linux machine can be daunting task sometimes. As most of the people are more familiar with windows process, thats why we face issues while installing. There are multiple installation file types and different ways to install. They come with different extensions some of them can be installed just like windows using double click, but some require the command to be executed using a terminal. Make sure you have the super user privileges to make changes on the linux system.
How to install using .sh file
.sh is a shell script, the installation commands are mentioned in the .sh file. You can also see the commands written in the file by opening it with gedit. These files need to have a permission to be executed.
- Navigate to the location where your .sh file is located. First you provide execute permission to your .sh file.
chmod +x filename.sh
- And to run your script.
How to install using apt-get command
This requires internet connection as it will download the package from software center. I will demonstrate how to install tomcat7.
- First we will update the apt-get package list.
sudo apt-get update
it will ask you for superuser permissions.
- sudo apt-get install tomcat7
Now it will ask for the confirmation whether to proceed to make changes or not. Say yes. type y
How to install using .run files
The difference between .sh and .run is, a .run file is normally a custom made program which needs to be executed in order to install a program. It is close to the windows .exe. You can simply double click on it to install it, or follow below instruction.
- Provide execute permission to file
chmod +x filename.run
- Execute the file with sudo privilages
How to install using .deb file
Packages are manually installed via the dpkg command(Debian Package Management System). dpkg is the backend to commands like apt-get and aptitude, which in turn are the backend for GUI install apps like the Software Center and Synaptic. .deb file can also be installed by double clicking on it. Lets see the commands to install .deb.
- sudo dpkg -i /path/to/deb/file.deb
- sudo apt-get install -f
You can also install it using apt-get install, but first move your .deb file to /var/cache/apt/archives/ directory.
I will keep adding more file formats and other methods to install software in linux.