Things are not "executable" that are written by the user by default, you have to make it executable... chmod +x /path-to/filename.ext then you can execute it with the absolute or relevant path name ./filename.ext ~/Folder/filename.ext /path/to/Folder/filename.ext Answer from acejavelin69 on reddit.com
🌐
GeeksforGeeks
geeksforgeeks.org › linux-unix › how-to-run-file-in-linux
How to Run a File in Linux - GeeksforGeeks
July 23, 2025 - Right-click on the file, choose "Open With", and select the appropriate application to open it. Here is how you can do it - ... You may see your file running now. To run a file in Linux using the terminal, follow these steps: 1. Navigate to the ...
🌐
Reddit
reddit.com › r/linux4noobs › how do i run an executable from the terminal on linux manjaro?
r/linux4noobs on Reddit: How do I run an executable from the terminal on Linux Manjaro?
Things are not "executable" that are written by the user by default, you have to make it executable... chmod +x /path-to/filename.ext then you can execute it with the absolute or relevant path name ./filename.ext ~/Folder/filename.ext /path/to/Folder/filename.ext
Videos
February 26, 2019
5.98K
February 16, 2016
🌐
Stack Overflow
stackoverflow.com › questions › 35259825 › linux-how-to-run-execute-a-file-in-the-command-line-without-the
linux - how to run/execute a file in the command line without the ./ - Stack Overflow
the idea is to do this way in any directory, not only one in specific! 2016-02-07T22:40:41.723Z+00:00 ... Edit your "$PATH" variable to include the directory in which this file is located. For example, this is a part of my "$PATH": /usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/rany/bin ... After putting an executable script in one of these directories you'll be able to execute it by simply typing its name at the command line.
🌐
Living the Linux Lifestyle
livingthelinuxlifestyle.wordpress.com › 2020 › 02 › 09 › how-to-execute-files-in-linux
How to Execute Files in Linux – Living the Linux Lifestyle
February 9, 2020 - You can mark some files as executable within the GUI. Start your favorite file manager, then navigate to the desired program. Right-click the program, then select the “Permissions” tab. Under Execute, change the permissions to the desired value, such as Only Owner, Only Owner and Group, or Anyone.
🌐
Wikihow
wikihow.com › computers and electronics › operating systems › linux › how to run files in linux: 9 steps (with pictures) - wikihow
How to Run Files in Linux: 9 Steps (with Pictures) - wikiHow
June 18, 2025 - If asked to do so, enter the password you use to log into your Linux computer and press Enter. ... Type the command to run the file. The command you use to open the file is going to be a different depending on the file type. Enter one of the following commands and press Enter to run the file.
🌐
Stack Exchange
unix.stackexchange.com › questions › 4430 › why-do-we-use-dot-slash-to-execute-a-file-in-linux-unix
command line - Why do we use "./" (dot slash) to execute a file in Linux/UNIX? - Unix & Linux Stack Exchange

The literal answer is as others have given: because the current directory isn't in your $PATH.

But why? In short, it's for security. If you're looking in someone else's home directory (or /tmp), and type just gcc or ls, you want to know you're running the real one, not a malicious version your prankster friend has written which erases all your files. Another example would be test or [, which might override those commands in shell scripts, if your shell doesn't have those as built-ins.

Having . as the last entry in your path is a bit safer, but there are other attacks which make use of that. An easy one is to exploit common typos, like sl or ls-l. Or, find a common command that happens to be not installed on this system — vim, for example, since sysadmins are of above-average likelyhood to type that.

Does this sound too theoretical? It largely is, but it definitely can happen in reality, especially on multi-user systems. In fact, here is an example from this site where an administrator switched to a users' home directory and found ps to be masked by an executable of that name.

Answer from mattdm on unix.stackexchange.com
🌐
Reddit
reddit.com › r/linux4noobs › how can i run a downloaded file?
r/linux4noobs on Reddit: How can i run a downloaded file?
you should give more details. you extract the files from the archive, then what to do next totally depends on the files that were in the archive. so extract the files, and give more details.
🌐
Quora
quora.com › How-do-I-run-a-file-in-terminal-using-Linux
How to run a file in terminal using Linux - Quora
Answer (1 of 5): You can only run executable files. You can confer executable properties to any file using the chmod command. You need to do this if the file is a script that you wrote. If the file was created by a compiler & linker, it almost certainly has executable permissions. If you don't kn...
Find elsewhere
🌐
Ask Ubuntu
askubuntu.com › questions › 334637 › run-executable-file-on-terminal
command line - Run executable file on terminal - Ask Ubuntu

Your script should look like:

#!/bin/bash

passwd

Save it in a file, let say password.sh or simple password, then make it executable using next commands in terminal:

cd /path/to/password.sh  #or cd /path/to/password
chmod +x password.sh     #or chmod +x password

To run it from terminal, just use the following command:

./password.sh            #or ./password

or

/path/to/password.sh     #or /path/to/password

To run it only using:

password.sh              #or password

you must to add the path of the script to the PATH. See How to add a directory to the PATH? in this sense.

Answer from Radu Rădeanu on askubuntu.com
🌐
Arch Linux Forums
bbs.archlinux.org › viewtopic.php
how do you execute a file from terminal? / Newbie Corner / Arch Linux Forums
Not being able to run executable files in the same directory as you are in is a security measure. You can always do ./$executable as said before, or, if it's a script, call the interpreter to execute it: ... Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
🌐
MakeUseOf
makeuseof.com › home › linux › how to read and execute from a file with the linux source command
How to Read and Execute From a File With the Linux source Command
September 23, 2022 - If you execute a Bash shell script that modifies an environment variable $TEST, the script will spawn a new, forked shell process, and modification of $TEST will take place within it instead of the original Bash environment. The child process will not be able to modify the parent process's environment. It can only modify its own environment. Let's understand this with a practical example: export TEST="deb" vi example # Type these commands in the file export TEST="bed" echo $TEST # Write out the file, make it executable, and then execute it chmod +x example ./example # this will return "bed" echo $TEST # this will return "deb"
🌐
Wikihow
wikihow.com › computers and electronics › operating systems › linux › how to execute .run files (& more) in linux: 2 easy ways
How to Execute .RUN Files (& More) in Linux: 2 Easy Ways
July 9, 2025 - In the default file manager in Ubuntu and many other versions of Linux, you can do this by right-clicking (or control-clicking) the file you want to run and selecting Properties. It should be similar in other file managers.
🌐
Gcore
gcore.com › home › developers › how to make a file executable in linux
How to Make a File Executable in Linux | Step-by-step Guide
Running an Executable. Once a file is executable, you can run it from the terminal. If the file is in your current directory, you’d typically prefix it with ./, as in ./my_script.sh. Let’s walk through the steps to make a file executable in Linux.
🌐
Linux Mint Forums
forums.linuxmint.com › board index › interests › programming & development
running executables in terminal - Linux Mint Forums
So Linux Mint 21 won't be affected by this issue and executables will run from the file manager. That said, if you want to run executable binaries from a terminal when you double-click them in Nemo you have to use something like above (or a Nemo action, or …).
🌐
Baeldung
baeldung.com › home › files › why do we use ./ (dot slash) to execute a file in linux
Why Do We Use ./ (Dot Slash) To Execute a File in Linux | Baeldung on Linux
March 18, 2024 - Although we are in the same directory as the script.sh file, Bash could not find this file. Therefore, we need to specify the relative or absolute path to the file so that shell knows where our executable file is. In Linux, the dot character (.) denotes the current directory.
🌐
VITUX
vitux.com › how-to-execute-bin-and-run-files-in-ubuntu
How to Execute .bin and .run Files in Ubuntu – VITUX
Run File: These are also executable ... install Linux programs. Run Files contain program data and instructions for installation; they are often used for distributing device drivers and software applications. Run packages are easily executed from the Ubuntu command line, the terminal. In this article, we will explain how to run/execute the files with .run and .bin extensions on Ubuntu ...
🌐
Super User
superuser.com › questions › 48773 › how-to-run-an-exe-from-linux-command-prompt
How to run an .exe from linux command prompt - Super User

try:

abc/info.exe

but if it's really a Windows program, you will need to install "wine", then do:

wine abc/info.exe

but only some Windows programs will work under wine.

Answer from JoelFan on superuser.com
🌐
Wikihow
wikihow.com › computers and electronics › internet › downloading › file sharing › how to run a file in unix: 3 steps (with pictures) - wikihow
How to Run a File in Unix: 3 Steps (with Pictures) - wikiHow
December 23, 2024 - You can run a file in UNIX by invoking the file name from the command line. Alternatively, you can also choose to invoke a specific shell to run the file. ... Check that you have permission to run (or) execute the file.
🌐
Ask Ubuntu
askubuntu.com › questions › 286263 › how-to-execute-a-file-as-program
64 bit - How to execute a file as program? - Ask Ubuntu

Try ./filename.sh If that doesn't work, post the code error so I can more clearly see what the problem is. Hope this helps!

Answer from Bf109guy on askubuntu.com