How to Run Files in Linux

It is explained in this ementes how to run files under Linux. The majority of files can be accessed and executed through a file manager programme. The default File Manager that comes pre-installed on most Linux distributions is called gdb. In Linux, you can also run a file by using the Terminal command. This is the recommended method for running “.run,” “.sh,” and “.bin” files, among other types of files.

Method 1 Using a File Manager

1. Open a file manager application on your computer. The default file manager programme is included with the majority of Linux distributions. Nautilus, Thunar, Dolphin, Krusader, Konqueror, or PCManFM are examples of such programmes. The majority of these programmes operate in a very similar manner. To access your file manager, select the icon that resembles a file cabinet or the folder that says “Home” on your desktop, dock, or Activities menu and then click on it.

If you are unsure of where your file browser application is located, you can press the Super (Windows) key and type “Files” (or the name of the file manager) in the search bar.

If you don’t like the file manager that came with your Linux distribution, you can install a different file manager in the Terminal. To do so on Debian/Ubuntu, open the Terminal and type sudo apt install <app name> and press Enter. On Fedora, open the Terminal and type sudo dnf install <app name> and press Enter. Replace “<app name>” with the name of the app you want to install.

2. Navigate to the location of the file by selecting it and pressing Enter. The majority of file managers have a large panel that allows you to browse through folders and subfolders. To open a folder, simply double-click on it. Navigate to the folder containing the file that you want to run and double-click it.

3. Right-click the file you want to run and select “Run as administrator.” A drop-down menu is displayed as a result of this.

Alternatively, you can double-click the file to have it open in the default application that the file type is associated with when you want to use it.

4. Click Open With or Open With Other Appllicaiton. This displays a list of applications you can use to run the file.

5. Using your mouse, double-click the application you want to use to run the file. This will open the file in the application of your choice and run it.

To see all of the applications that you use to run the file, select View All Applications or Other from the drop-down menu. This displays a list of all of the installed apps, organised by type of application. Select the category of the application in which you want to run the file. Then double-click the application that you want to use to run the file.

Method 2 Using the Terminal

1. Press Ctrl+Alt+T to open the Terminal. You can open the Terminal by selecting it from your Apps menu by clicking on the icon that looks like a black screen with a white text cursor, or by pressing the keys Ctrl+Alt+T on your keyboard.

2. Change the directory to the folder containing the file that you want to run by double clicking on it. Enter cd followed by the path to the directory you want to change to and press Enter in the Terminal to change the directory.

For example, if the file is in your documents folder, you would type cd /Documents.

3. Type sudo chmod +x <filename> and press ↵ Enter. Replace “<filename>” with the actual name of the file (it cannot contain any spaces). When you run this command, the user permissions are changed to allow you to run and edit the file.

If prompted, type in the password that you use to log into your Linux computer and press the Enter key to continue.

4. Enter the command to run the file in the text box. Depending on the file type, the command you use to open the file will be slightly different from the previous one. To run the file, type one of the following commands and press Enter to execute it. “filename>” should be replaced with the actual filename of the file (i.g. “textfile.txt”). There can’t be any spaces in the filename. The following are some examples of commands that you can use to run a file from within the Terminal:

Run a file:sudo ./<filename>. This includes “.sh”, “.run”, and “.bin” files.

Open a file in it’s default application: xdg-open <filename>

Display an image file: display <filename>. You must have ImageMagick installed.

Display a text file in the Terminal: cat <filename>.

Display a text file one page at a time: less <filename>

Display a text file with numbered lines: nl <filename>

Creative Commons License

Visit for: |  Auto  |  Games  |  Health  |  How To  |  Latest Review  |  News  |  Sports   |  Tech  |  Outsourcing  |