I’ve been using Windows long enough to ignore the number of ways to install the program in Linux. There is a file format “install.sh” in the Linux universe, and it is an efficient way to bundle a package securely. I wonder why other desktop environments such as Windows and macOS didn’t adopt it because it’s a convenient and effective way to install programs on the PC. Nonetheless, I will show you several ways to unpack .sh file format and install the program on the machine.
What is .sh format?
I started using Linux distributions in 2017, and Lubuntu helped me enter the open-source universe. A newbie would not know about the file format since .exe and DMG are what we have seen in the past. The .sh file format is a shell script designed for advanced Linux operating systems and Unix-like systems. I’m on Ubuntu 20.4 (LTS), and I’m trying to install Xtreme Download Manager on it.
Of course, there are multiple ways to install the program on the machine, and I will show you all of them. The first method has worked for me and it may work for you as well, but if it doesn’t then you can try other methods that I have shown below.
First, you have to confirm that it is .sh and based on shell script because I found non-working shell scripts online.
I saved the Xtreme Download Manager from the official site, and it was in archived format. Make sure to decompress it in the local storage and open it.
How to open .sh Files in Terminal?
A terminal is a powerful tool in desktop-class operating systems, and that’s what going to come in handy.
- Go to the extracted .sh file and right-click the mouse to choose “Open in Terminal”.
- Copy & paste the command “sudo bash filename.sh” and press the “Enter” key.
- Enter the administrator or account password and then press the “Enter” key.
- The program is unpacked and installed successfully.
- DXM is on the menu.
Do not close the Terminal while it is working in the background to install the program. There are times when you will feel Terminal has stopped working, but it is working in the background. Nonetheless, the XDM is a lightweight program, so it took less than a minute to install in the machine.
How to Run .sh Files in Terminal? (Second Method)
I told you that some .sh files don’t work correctly in a few Linux software, so it is better to try multiple methods.
- Go to the .sh file and right-click the mouse to choose “Open in Terminal”.
- Copy & paste sh filename.sh command with the file name.
- Press the “Enter” key to register the command.
You can try the command that I have suggested above, and both solutions have worked me flawlessly. I had zero complications in installing the .sh files in Linux software, and I have shown you other ways to do it.
Execute .sh File in Linux
Linux distributions have an advanced feature that allows the programs to execute. You can execute the .sh program without Terminal, but it works with selected distros only.
- Click to select the .sh program.
- Right-click the mouse and choose “Properties”.
- The properties window shows up on the screen, and click “Permissions”.
- Select “Execute” and make sure it is checked.
- Close the window.
Open the .sh file, and it should open automatically, and if it did not work, then move on to the next solution.
The Last Three Commands (Root Access Needed)
Since Linux works differently on other bases, so I have mentioned three more commands that install .sh files.
- Type “bash filename.sh” and press the “Enter” key.
- Type “./filename.sh” and press the “Enter” key
- Type “chmod +x filename.sh” and then press the “Enter” key.
The first two solutions should be enough to install .sh file formats, but if the file is unable to execute, then it is either corrupted or incorrectly packaged.
I’ve shown you all ways to install the .sh program on Linux PC. You got multiple commands, and I covered the implementation tutorial, so you shouldn’t encounter any complications. Let us know what do you think about the .sh file format in the comment section below.