How to Run INSTALL.SH File on Linux with Terminal

Table of contents:

How to Run INSTALL.SH File on Linux with Terminal
How to Run INSTALL.SH File on Linux with Terminal

Video: How to Run INSTALL.SH File on Linux with Terminal

Video: How to Run INSTALL.SH File on Linux with Terminal
Video: How To Use ufw Firewall In Ubuntu (allow port from IP) 2024, November
Anonim

Linux offers several convenient ways or media for installing new programs, such as the Ubuntu Software Center and Synaptic Package Manager. However, some applications still need to be installed via Command Prompt or Terminal. This wikiHow teaches you how to install an application from the INSTALL.sh file using the command line.

Step

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 required files are usually compressed in.tar,.tgz, or.zip formats.

If the downloaded script file is in INSTALL.sh″ format, you will need to compress it into.zip or.tar format before proceeding. Right click the script file, select " Compress… ", click " .zip, and select " 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 contents of the Tar or Zip file to the desktop

Right-click the downloaded archive file, then select Extract Here ” (option labels may vary depending on the Linux version used). A new folder containing the program's installation files will be created on the desktop.

  • If you are logged in via the console, extract the.tar file by running tar -x filename.tar in Terminal.
  • To extract the contents of a.tgz or.tar.gz file from the Command Prompt or Terminal, use the command tar -xzf filename.tgz or tar -xvf filename.tar.gz.
  • To extract the.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 the extracted folder

If you don't see the “install.sh” file in it, it's probably in a subfolder. Locate the folder that contains the file, then proceed to 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 a Terminal window

The fastest way to open Terminal in most window managers is via the keyboard shortcut Ctrl+Alt+T.

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

Step 5. Type cd ~/address/complete/to/folder/extraction and press Enter

Replace the entry /address/complete/to/folder/extraction″ with the full address of the folder containing the “install.sh” file.

  • For example, if you extracted a file to the desktop, you could type cd ~Desktop/filename. After typing the first few letters of the folder name, press the Tab key to enter the folder name automatically.
  • To make sure you're accessing the right folder, type ls -a at the start of the command line and press Enter. You can see the same list of files and folders when you double-click a new folder on the 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 and press Enter

If the installation file has a name other than install.sh″, type that name. In this way, the installation file can be run by the computer. You will not see a confirmation message for this command.

As long as you don't see an error message, you can be sure the script can run

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

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

Again, replace install.sh″ with the filename.sh if necessary.

If you get an error message, use the 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 master password (root) and press Enter key

The application installation process will be carried out.

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

Step 9. Follow the prompts shown on the screen to complete the installation

You may need to enter additional information to complete the installation, depending on the application or program you want to install.

Recommended: