How To Run INSTALL.sh Files On Linux Using The Terminal

Table of contents:

How To Run INSTALL.sh Files On Linux Using The Terminal
How To Run INSTALL.sh Files On Linux Using The Terminal
Anonim

Linux offers many easy ways to install new programs, for example through the use of the Ubuntu Software Center and Synaptic Package Manager. However, some applications still need to be installed from the command prompt. This article explains how to install an application from an install.sh file with the command line.

Steps

Execute INSTALL.sh Files in Linux Using Terminal Step 1
Execute INSTALL.sh Files in Linux Using Terminal Step 1

Step 1. Download the program you want to install

The necessary files are usually compressed in.tar,.tgz or.zip format.

If the script you downloaded is already in ″ INSTALL.sh ″ format, you need to compress it in.zip or.tar format before continuing. Right click on the script, select Compress …, then .zip and finally click Create.

Execute INSTALL.sh Files in Linux Using Terminal Step 2
Execute INSTALL.sh Files in Linux Using Terminal Step 2

Step 2. Extract the tar or zip file to the Desktop

Right-click on the archive you downloaded, then select Extract here (exact text varies based on the Linux version you use). A new folder will be created on the desktop containing the installation files.

  • If you are logged in from the console, you can extract a.tar file with the tar –x filename.tar command.
  • To extract a.tgz or.tar.gz file with the command prompt, type tar -xzf filename.tgz or tar -xvf filename.tar.gz.
  • To extract a.zip file from the console, type unzip filename.zip.
Execute INSTALL.sh Files in Linux Using Terminal Step 3
Execute INSTALL.sh Files in Linux Using Terminal Step 3

Step 3. Double click on the extracted folder

If you don't see the install.sh file inside the folder, it's probably located in one of the subfolders. Find out which of them it is contained in, then continue with the next step.

Execute INSTALL.sh Files in Linux Using Terminal Step 4
Execute INSTALL.sh Files in Linux Using Terminal Step 4

Step 4. Open the terminal window

The quickest way to do this is to press Ctrl + Alt + T on your keyboard.

Execute INSTALL.sh Files in Linux Using Terminal Step 5
Execute INSTALL.sh Files in Linux Using Terminal Step 5

Step 5. Type cd ~ / path / to / extracted / folder and press Enter

Replace ″ path / to / extracted / folder / ″ with the full path to the folder that contains the install.sh file.

  • For example, if you have extracted the files to your desktop, you can write cd ~ Desktop / filename. Once you have typed the first few letters of a folder name, you can press the Tab key ↹ to automatically complete the name.
  • To make sure you are in the right path, type ls -a in the command prompt, then press Enter. You should see the list of the same files and folders contained in the directory you just created on your desktop.
Execute INSTALL.sh Files in Linux Using Terminal Step 6
Execute INSTALL.sh Files in Linux Using Terminal Step 6

Step 6. Type chmod + x install.sh then press Enter

If the installer has a name other than ″ install.sh ″, enter the correct file name. This command makes the installation file executable. No confirmation messages will appear.

If no error message appears, the script is now executable

Execute INSTALL.sh Files in Linux Using Terminal Step 7
Execute INSTALL.sh Files in Linux Using Terminal Step 7

Step 7. Type sudo bash install.sh and press Enter

Again, replace ″ install.sh ″ with the name of the.sh file if necessary.

If an error appears, try this command sudo./install.sh

Execute INSTALL.sh Files in Linux Using Terminal Step 8
Execute INSTALL.sh Files in Linux Using Terminal Step 8

Step 8. Enter the root user's password and press Enter

The application installation will start.

Execute INSTALL.sh Files in Linux Using Terminal Step 9
Execute INSTALL.sh Files in Linux Using Terminal Step 9

Step 9. Follow the on-screen instructions to complete the installation

Depending on the app, you may need to enter additional information to complete the installation.

Recommended: