TechBriefly
  • Tech
  • Business
  • Crypto
  • Science
  • Geek
  • How to
  • About
    • About TechBriefly
    • Terms and Conditions
    • Privacy Policy
    • Contact Us
    • Languages
      • 中文 (Chinese)
      • Dansk
      • Deutsch
      • Español
      • English
      • Français
      • Nederlands
      • Italiano
      • 日本语 (Japanese)
      • 한국인 (Korean)
      • Norsk
      • Polski
      • Português
      • Pусский (Russian)
      • Suomalainen
      • Svenska
No Result
View All Result
TechBriefly
Home How to
Running files in Linux using file manager or the terminal

Running files in Linux using file manager or the terminal

Learn how to run files in Linux using either a file manager or the terminal for various file types.

Aytun ÇelebibyAytun Çelebi
21 August 2025
in How to
Reading Time: 3 mins read
Share on FacebookShare on Twitter

This guide will show you how to run files in Linux. You can execute most files through a graphical file manager, which is typically pre-installed on most Linux distributions. Alternatively, the Terminal provides a powerful command-line interface, especially useful for running script files like .sh, .run, and .bin.

Before you start: Ensure you have the necessary permissions to execute files, or know your user password for sudo commands.

How to run a file in Linux

Follow these detailed steps to execute files on your Linux system, using either a graphical file manager or the command line.

Using a file manager

  • Open a file manager application. Most Linux distributions include a default file manager such as Nautilus, Thunar, Dolphin, Krusader, Konqueror, or PCManFM. You can typically find its icon resembling a file cabinet or a folder labeled “Home” on your desktop, dock, or Activities menu.
    • If you can’t find it: Press the Super (Windows) key and type “Files” into the search bar.
    • To install a different file manager: Open the Terminal.
      • If Debian/Ubuntu: Type sudo apt install <app name> and press Enter.
      • If Fedora: Type sudo dnf install <app name> and press Enter. (Replace <app name> with the desired application name.)
  • Navigate to the folder where your file is located by double-clicking folders in the large browsing panel.
  • Right-click the file you want to run to display a drop-down menu. You can also double-click the file to run it with its default associated application.
  • Click Open With or Open With Other Application from the menu.
  • Double-click the application you want to use to run the file. If your desired application is not immediately visible, click View All Applications or Other to see a categorized list of all installed apps.

Using the Terminal

  • Press Ctrl+Alt+T to open the Terminal. Alternatively, click the Terminal icon (often a black screen with a white text cursor) in your Apps menu.
  • Change the directory to the folder containing the file. Type cd followed by the directory path (e.g., cd /Documents) and press Enter.
  • Type sudo chmod +x <filename> and press Enter. (Replace <filename> with the exact name of your file, ensuring no spaces). This command grants execute permissions to the file. If prompted, enter your Linux computer’s password and press Enter.
  • Type the appropriate command to run the file based on its type and press Enter:
    • To run executable scripts (.sh, .run, .bin): Type sudo ./<filename>
    • To open a file with its default application: Type xdg-open <filename>
    • To display an image file (requires ImageMagick): Type display <filename>
    • To display a text file directly in the Terminal: Type cat <filename>
    • To display a text file one page at a time: Type less <filename>
    • To display a text file with numbered lines: Type nl <filename>
Pro tip: When working in the Terminal, you can use the Tab key for auto-completion of file and directory names, which saves time and prevents typos.

What to do next?

Mastering file execution is a fundamental skill in Linux. Once you’re comfortable with these methods, consider exploring other powerful aspects of the Linux command line. Learning more commands can significantly enhance your productivity and control over your system.

You might also want to delve into shell scripting, which allows you to automate repetitive tasks and create custom commands. Many online resources and communities are available to help you continue your journey in Linux, providing a pathway to becoming a more proficient user.

Tags: file managerlinuxterminal
ShareTweet
Aytun Çelebi

Aytun Çelebi

Starting with coding on Commodore 64 in elementary school moving to web programming in his teenage years, Aytun has been around technology for over 30 years, and he has been a tech journalist for over 20 years now. He worked in many major Turkish outlets (newspapers, magazines, TV channels and websites) and managed some. Besides journalism, he worked as a copywriter and PR manager (for Lenovo, HP and many international brands ) in agencies. He founded his agency, Linkmedya in 2019 to execute his way of producing content. He is recently interested in AI, automation and MarTech.

Related Posts

How to install mods and custom content in The Sims 2

How to install mods and custom content in The Sims 2

26 December 2025
Running Python files and fixing path errors on Windows

Running Python files and fixing path errors on Windows

26 December 2025
How to boot your PC into Command Prompt for troubleshooting

How to boot your PC into Command Prompt for troubleshooting

26 December 2025
How to delete a virus using Command Prompt

How to delete a virus using Command Prompt

26 December 2025

LATEST

New Punkt MC03 features split OS for better privacy control

Samsung reveals brighter Freestyle+ projector ahead of CES 2026

OpenAI explores prioritized ads for ChatGPT responses

Apple teases something big for Fitness+ in 2026

Samsung SDI rumored to test massive 20000mAh battery

Honor sells over 71 million smartphones in 2025

New WhatsApp update brings 2026 stickers and video call effects

Leaker reveals Xiaomi plans for high end eSIM device in 2026

HP prepares OMEN OLED monitor reveal for CES 2026

High RAM costs from AI boom could delay next Xbox and PlayStation

TechBriefly

© 2021 TechBriefly is a Linkmedya brand.

  • Tech
  • Business
  • Science
  • Geek
  • How to
  • About
  • Privacy
  • Terms
  • Contact
  • | Network Sites |
  • Digital Report
  • LeaderGamer

Follow Us

No Result
View All Result
  • Tech
  • Business
  • Crypto
  • Science
  • Geek
  • How to
  • About
    • About TechBriefly
    • Terms and Conditions
    • Privacy Policy
    • Contact Us
    • Languages
      • 中文 (Chinese)
      • Dansk
      • Deutsch
      • Español
      • English
      • Français
      • Nederlands
      • Italiano
      • 日本语 (Japanese)
      • 한국인 (Korean)
      • Norsk
      • Polski
      • Português
      • Pусский (Russian)
      • Suomalainen
      • Svenska