Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
51
views
Unavailable executable still remains
Please note: This is not a question related to pip or python. I am trying to make sense of why I see a "permission error" instead of "path not found" error. I have done many installations and uninstallation for different softwares including python. So I can't recall how the setup was many years back...
Please note: This is not a question related to pip or python.
I am trying to make sense of why I see a "permission error" instead of "path not found" error.
I have done many installations and uninstallation for different softwares including python. So I can't recall how the setup was many years back.
My core question is why I see an "
zsh: permission denied: pip
" instead of "pip not found". When an executable doesn't exist, I would expect it to be say "not found" vs pointing to a possible permission issue.
And secondly; is there a way in linux\unix\mac to identify all commands\symlinks\aliases that are broken now?
Here is my terminal output
ayusman :$ pip
zsh: permission denied: pip
ayusman :$ which pip
pip not found
ayusman :$ type pip
pip not found
ayusman :$
Thank you.
Ayusman
(141 rep)
Aug 5, 2025, 12:26 AM
• Last activity: Aug 6, 2025, 11:20 PM
0
votes
1
answers
2065
views
Advanced access control solutions for managing execution permissions on Fedora systems
I would like to learn about solutions/alternatives for managing execution access to applications in Linux-based systems (specifically Fedora flavours). I already researched possibilities like Integrated Measurement Architecture, fapolicyd, or Microsoft Integrity Policy Enforcement. I am more interes...
I would like to learn about solutions/alternatives for managing execution access to applications in Linux-based systems (specifically Fedora flavours).
I already researched possibilities like Integrated Measurement Architecture, fapolicyd, or Microsoft Integrity Policy Enforcement.
I am more interested in solutions with more capabilities than simply comparing the hash value of the executable against a known list, but at this point pretty much any suggestion is welcome.
The purpose for which I need this mechanism is to enforce the users of specific machines (which I own and manage) to only be able to execute code that I have authorised them to.
Tedy S.
(1 rep)
Nov 13, 2020, 02:08 PM
• Last activity: Aug 6, 2025, 04:04 AM
1
votes
1
answers
33
views
Making Neovim from GitHub the default file handler for text/source files
There may be a simple answer to this, but if there is, I'm not aware of it. I've downloaded the latest GitHub release of Neovim, because the one in the `apt` repositories is outdated by a few major versions. After following the installation instructions on the GitHub page, the `nvim` executable is p...
There may be a simple answer to this, but if there is, I'm not aware of it.
I've downloaded the latest GitHub release of Neovim, because the one in the
apt
repositories is outdated by a few major versions. After following the installation instructions on the GitHub page, the nvim
executable is placed in /opt/nvim-linux-x86_64/bin
. From there, I can simply add it to my PATH in my .bashrc
.
This works fine for terminal use, but what if I got lazy and wanted to open files via the graphical file browser? It works fine with the apt
version, because that is a deb package and everything.
In the "Default Applications" app on Mint I've tried setting the default app for source code and text files as the nvim
executable. It says it works, but when I try to double-click on a text file to open it, it doesn't.
I've tried it numerous times, and I also tried adding the %U
flag to it, to no avail.
So as the title says, how can I set this version of nvim as my default app for text/source files?
Tumbleweed64
(23 rep)
Jul 29, 2025, 11:26 PM
• Last activity: Jul 30, 2025, 06:08 AM
0
votes
1
answers
2288
views
How to run external executables within firejail
My machine is home desktop(personal) running Debian Buster with i3 window manager. I recently installed firejail with `apt install firejail* firetools` and also downloaded the new Firefox 83 browser from Firefox official website. I can run the firefox binary as a non-firejail user, as in, navigating...
My machine is home desktop(personal) running Debian Buster with i3 window manager. I recently installed firejail with
apt install firejail* firetools
and also downloaded the new Firefox 83 browser from Firefox official website. I can run the firefox binary as a non-firejail user, as in, navigating to the new firefox directory and running [user@debian]:$ ./firefox
It works fine and all. However, if I try doing, firejail --noprofile --seccomp --private --nonewprivs /home/user/downloads/firefox/firefox
it says, the file firefox isn't executable
. Running ls -l on the executable returns that it is executable. Then I copied the whole new firefox directory to /tmp/ then opened a new firejail bash session with firejail --seccomp --private --nonewprivs bash
, then started a sandboxed bash session. Then copied the firefox directory from /tmp/ to $HOME and tried running the firefox binary from there, and it says permission denied
The file was executable, and was owned by same user. What am I doing wrong here.
atheros
(256 rep)
Dec 2, 2020, 09:31 AM
• Last activity: Jul 19, 2025, 10:01 PM
13
votes
1
answers
67238
views
No such file or directory but I can see it!
I'm trying to run a python script, on a headless Raspberry PI using winSCP and get the following error message: Command '"./areadetect_movie_21.py"' failed with return code 127 and error message /usr/bin/env: python : No such file or directory. When I try and run from terminal, I get: : No such file...
I'm trying to run a python script, on a headless Raspberry PI using winSCP and get the following error message:
Command '"./areadetect_movie_21.py"'
failed with return code 127 and error message
/usr/bin/env: python
: No such file or directory.
When I try and run from terminal, I get:
: No such file or directory.
I try a similar python script, in the same directory, with the same python shebang, the same permissions and using the same user pi, and it works.
I also do a
ls
and I can see the file, so I don't know why it will not run.
reggie
(533 rep)
Mar 10, 2015, 12:34 PM
• Last activity: Jun 12, 2025, 04:42 PM
-1
votes
1
answers
59
views
Why does the position of `exec` flag in `/etc/fstab` matter?
I find it peculiar, that I could not execute binaries / scripts on my new RAMdisk (tmpfs). **1)** tmpfs /ramdisk tmpfs exec ,size=3G,noauto,sync,user,rw,x-gvfs-show,x-gvfs-name=RAM 0 0 versus **2)** tmpfs /ramdisk tmpfs size=3G,noauto,sync,user,rw,x-gvfs-show,x-gvfs-name=RAM, exec 0 0 *** **In the f...
I find it peculiar, that I could not execute binaries / scripts on my new RAMdisk (tmpfs).
**1)**
tmpfs /ramdisk tmpfs exec,size=3G,noauto,sync,user,rw,x-gvfs-show,x-gvfs-name=RAM 0 0versus **2)**
tmpfs /ramdisk tmpfs size=3G,noauto,sync,user,rw,x-gvfs-show,x-gvfs-name=RAM,exec 0 0*** **In the first case**, I can't execute anything, as in the exact error message: > bash: ./a.sh: Permission denied and returned code 126 to my Bash shell. *** Created the file as follows, for completeness:
vlastimil@rog-g713pi /ramdisk $ cat a.sh
#!/bin/sh
echo A
EOF
and I tried to run it directly as follows:
chmod 755 a.sh; ./a.sh; echo $?
***
Why does the position of exec
flag matter? (And is there possibly some other mystery waiting for me... :))
Thanks
OS: Linux Mint 22.1 (Cinnamon), based on Ubuntu 24.04.
Vlastimil Burián
(30505 rep)
May 29, 2025, 08:20 PM
• Last activity: May 30, 2025, 05:46 AM
191
votes
10
answers
427815
views
How to find out the dynamic libraries executables loads when run?
I want to find out the list of dynamic libraries a binary loads when run (With their full paths). I am using CentOS 6.0. How to do this?
I want to find out the list of dynamic libraries a binary loads when run (With their full paths). I am using CentOS 6.0. How to do this?
nakiya
Mar 17, 2014, 01:56 AM
• Last activity: Apr 22, 2025, 04:38 AM
0
votes
2
answers
2684
views
zsh: command not found: yt-dlp
The standalone executable `yt-dlp` recommended for macOS suddenly stopped working. I used it two weeks ago and it worked. I have not had any updates to my system, expect some brew updates/upgrades. Every time the command is run: `zsh: command not found: yt-dlp` I did not find any relevant issues on...
The standalone executable
yt-dlp
recommended for macOS suddenly stopped working. I used it two weeks ago and it worked. I have not had any updates to my system, expect some brew updates/upgrades.
Every time the command is run: zsh: command not found: yt-dlp
I did not find any relevant issues on the official repository. I re-installed the binary a few times and ensured it's not a path issue.
None of the similar questions with zsh: command not found
match my problem.
Output of echo $PATH:
/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/iTerm.app/Contents/Resources/utilities
For readability, the same, but with a line break after every :
:
/opt/homebrew/bin:
/opt/homebrew/sbin:
/Library/Frameworks/Python.framework/Versions/3.10/bin:
/usr/local/bin:
/System/Cryptexes/App/usr/bin:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:
/Applications/iTerm.app/Contents/Resources/utilities
Kamil
(49 rep)
May 31, 2024, 08:48 AM
• Last activity: Mar 16, 2025, 12:26 PM
0
votes
2
answers
75
views
Can you safely downgrade/upgrade/remove a package an executable of which is running by APT?
Suppose `apt` modifies or removes an executable, say a script file, of the package, while the executable is running. Can you rely the running executable will be intact so that the executable runs like it was not touched? Obviously `apt` can downgrade/upgrade itself, at least. In some cases overwriti...
Suppose
apt
modifies or removes an executable, say a script file, of the package, while the executable is running. Can you rely the running executable will be intact so that the executable runs like it was not touched? Obviously apt
can downgrade/upgrade itself, at least. In some cases overwriting a Bash script while it is running could alter its code, see this answer , but does using apt
somehow prevent that kind of behavior?
jarno
(738 rep)
Feb 27, 2025, 08:30 PM
• Last activity: Feb 28, 2025, 10:05 PM
4
votes
1
answers
356
views
Can't find executable file that is obviously present
I am trying to run the COMSOL license manager in Pop OS; however, when I try to run: $ ./lmgrd -c ../license.dat -l /var/tmp/comsol55.log I get the following error: > bash: ./lmgrd: No such file or directory The `lmgrd` file is clearly present in the current directory. Running `ldd lmgrd` gives the...
I am trying to run the COMSOL license manager in Pop OS; however, when I try to run:
$ ./lmgrd -c ../license.dat -l /var/tmp/comsol55.log
I get the following error:
> bash: ./lmgrd: No such file or directory
The
lmgrd
file is clearly present in the current directory. Running ldd lmgrd
gives the following output:
linux-vdso.so.1 (0x00007acd5ec0d000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007acd5ebf0000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007acd5eb09000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007acd5eae9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007acd5e800000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007acd5eae4000)
/lib64/ld-lsb-x86-64.so.3 => /lib64/ld-linux-x86-64.so.2 (0x00007acd5ec0f000)
Is the issue here that the first dependency is missing? If so, what package is required to add that in Pop OS?
Time4Tea
(2628 rep)
Feb 24, 2025, 03:13 PM
• Last activity: Feb 24, 2025, 03:51 PM
0
votes
0
answers
131
views
How can I achieve the "Run in Konsole" action using the Enter key on the keyboard?
When hitting enter (or double-clicking) an executable shell script (a ".sh" file, for instance), it would be nice if this would launch the script inside a console window. I am using the Dolphin file manager, and KDE with Debian 11. While there are many ways to open, launch, and execute scripts, but...
When hitting enter (or double-clicking) an executable shell script (a ".sh" file, for instance), it would be nice if this would launch the script inside a console window.
I am using the Dolphin file manager, and KDE with Debian 11. While there are many ways to open, launch, and execute scripts, but nothing that does this one simple thing.
When tapping enter on an executable shell script, the box below is displayed:
* "Open" will incorrectly "open the script" using the console app
*(result is that the console window opens, but nothing happens)*
* "Execute" will correctly run the script
*(result is that the script runs, but the console window never opens, and output is not shown unless it is redirected to a file)*
When right-clicking an executable script, the following menu is shown:
* "Open with Konsole" will incorrectly "open the script" using the console app
*(result is that the console window opens, but nothing happens)*
* **"Run in Konsole" is perfect!**
***(script is both opened AND run inside a new console window, and output is shown on-screen)***
The question is: **How can I achieve the "Run in Konsole" action using the Enter key on the keyboard?**
*That's the real problem here: using the mouse to right-click and pick over and over is tiresome.*
Apparently, this used to be possible in the Thunar file manager until recently (the feature was removed). Most other threads I have found on this topic all require the right-mouse-button:
* https://unix.stackexchange.com/q/233864/461964
* https://unix.stackexchange.com/q/326114/461964
Any advice or guidance is appreciated.


JonathanDavidArndt
(326 rep)
Dec 5, 2024, 07:23 PM
9
votes
3
answers
1439
views
Prevent application from being executed by any local user except systemd
I need to run the binary that I don't fully trust. I've created a systemd unit for it where it's locked down as much as humanly possible, it works great. Now it's still on my system (Fedora) and I may accidentally execute it. How can I prevent this? It still needs to be mode 700 or something to be e...
I need to run the binary that I don't fully trust.
I've created a systemd unit for it where it's locked down as much as humanly possible, it works great.
Now it's still on my system (Fedora) and I may accidentally execute it. How can I prevent this?
It still needs to be mode 700 or something to be executed by systemd which makes it executable by root and again I want to prevent this.
Now I can have three linked systemd units, where the first one makes it
chmod 700
, the second one actually executes it, the third one makes it chmod 644
but it's way too convoluted. I guess something simpler can be done.
Artem S. Tashkinov
(32730 rep)
Nov 10, 2024, 07:26 AM
• Last activity: Nov 11, 2024, 10:47 AM
2
votes
2
answers
3343
views
binary placed in folder on $PATH is not immediately accessible
in my `$PATH` I have folder `~/.zsh/bin` which I use for small scripts and custom built executable binaries, for example I added a recently compiled tool I made called `wercker_build_status` to the folder. Yet when I type in the command line `wercker_build_status` it can't find it, I have to type th...
in my
$PATH
I have folder ~/.zsh/bin
which I use for small scripts and custom built executable binaries, for example I added a recently compiled tool I made called wercker_build_status
to the folder. Yet when I type in the command line wercker_build_status
it can't find it, I have to type the full path to the file, ~/.zsh/bin/wercker_build_status
.
That's not to say nothing in the folder doesn't work, a script I have called wifi_status
is in there and typing that into the command line returns the wifi status as expected.
Why is it even though it's in my $PATH
I can't just use a file I add to the folder ~/.zsh/bin
?
Thermatix
(361 rep)
Apr 3, 2018, 09:06 AM
• Last activity: Oct 14, 2024, 05:46 AM
13
votes
1
answers
2765
views
Executable file named 'test' is in $PATH but won't run
I have a file in $HOME/bin (before you ask, yes, it is in my path) called `test` which I've confirmed can be executed fine when I run it with the full path to the file. However, I get a really weird issue when I don't run it this way. When I just run `test` in the terminal, it doesn't do anything an...
I have a file in $HOME/bin (before you ask, yes, it is in my path) called
test
which I've confirmed can be executed fine when I run it with the full path to the file. However, I get a really weird issue when I don't run it this way. When I just run test
in the terminal, it doesn't do anything and returns immediately. I know that this isn't an issue of finding the file for several reasons:
1. There is no error message. Normally if the file can't be found or can't be executed a message will be printed out saying so.
2. Running which test
still returns the correct file path.
3. Probably the weirdest of all - the script works fine when run through strace
. I tried using strace
to see if I could figure out what was going on but when I ran it with strace
, it worked as expected with 0 issues.
ContronThePanda
(131 rep)
Feb 4, 2019, 10:32 PM
• Last activity: Oct 3, 2024, 01:55 PM
92
votes
1
answers
12045
views
Why does the following bash script delete itself?
If you create an executable file with the following contents, and run it, it will delete itself. How does this work? #!/bin/rm
If you create an executable file with the following contents, and run it, it will delete itself.
How does this work?
#!/bin/rm
Stack Exchange Broke The Law
(2294 rep)
May 3, 2016, 11:38 AM
• Last activity: Oct 2, 2024, 10:22 AM
71
votes
1
answers
37826
views
Different methods to run a non-nixos executable on Nixos
What are the different methods to run a non-nixos executable on NixOs? (For instance proprietary binaries.) I'd like to see also the manual methods.
What are the different methods to run a non-nixos executable on NixOs? (For instance proprietary binaries.) I'd like to see also the manual methods.
tobiasBora
(4621 rep)
Jun 4, 2019, 12:32 PM
• Last activity: May 24, 2024, 01:36 PM
9
votes
2
answers
16233
views
How can I extract Signatures data from a Windows `exe` file under Linux using cli
If you go to the [VirusTotal link][1] , there is a tab called file info(I think; mine is dutch). You'll see a header called "Authenticode signature block and FileVersionInfo properties" I want to extract the data under the header using Linux cli. Example: > Signature verification Signed file, verifi...
If you go to the VirusTotal link , there is a tab called file info(I think; mine is dutch). You'll see a header called
"Authenticode signature block and FileVersionInfo properties"
I want to extract the data under the header using Linux cli. Example:
> Signature verification Signed file, verified signature
> Signing date 7:43 AM 11/4/2014
> Signers
> [+] Microsoft Windows
> [+] Microsoft Windows Production PCA 2011
> [+] Microsoft Root Certificate Authority 2010
> Counter signers
> [+] Microsoft Time-Stamp Service
> [+] Microsoft Time-Stamp PCA 2010
> [+] Microsoft Root Certificate Authority 2010
I used the
Camera.exe
in Windows 10, to somehow extract the data.
I extracted the .exe
file, and found a CERTIFICATE
file in it, there is a lot of unreadable data, but also some text, I can read, that is - roughly - the same like the above output.
How can I extract Signatures from a Windows .exe
file under Linux using cli
blade19899
(577 rep)
Mar 15, 2016, 11:01 AM
• Last activity: Apr 22, 2024, 01:39 PM
1
votes
1
answers
2202
views
How can I run an executable and tell it to use my discrete NVIDIA GPU instead of the onboard one?
I have a laptop with both a discrete and an onboard graphics card. I want to run a Game executable file using the discrete GPU but instead it runs on the obnboard one. How can I run it with the discrete GPU? *The game is not installed. It is a folder where I run the executable FILE.* * OS: Pop! OS (...
I have a laptop with both a discrete and an onboard graphics card. I want to run a Game executable file using the discrete GPU but instead it runs on the obnboard one. How can I run it with the discrete GPU?
*The game is not installed. It is a folder where I run the executable FILE.*
* OS: Pop! OS (Gnome)
* CPU: amd ryzen 5 4000series
* GPU: NVIDIA GTX 1650
* game: cities:skyline
* RAM: 16 gigs
* File explorer - Nautilus
I get this option for installed apps but how can I get it for executable files?
Tried to make the Desktop application
File:
location - /usr/share/applications/Cities.desktop - and double clicking it opens up the file explorer
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec="/home/{username}/Games/linux games/Cities - Skylines Collection/Cities.x64"
Name=Cities:Skyline
Icon="/home/{username}/Games/linux games/Cities - Skylines Collection/LauncherAssets/game-logo.png"
__GLX_VENDOR_LIBRARY_NAME=nvidia
__NV_PRIME_RENDER_OFFLOAD=1
__VK_LAYER_NV_optimus=NVIDIA_only

Ryno
(13 rep)
Apr 17, 2024, 09:43 AM
• Last activity: Apr 18, 2024, 02:34 PM
15
votes
3
answers
84357
views
Is it possible to run x86 executable on ARM?
I'm trying to install Navicat which is an x86-64 binary onto my aarch64 machine, which results in "cannot execute binary file: Exec format error" Here's the result of running ```file``` on the executable: ```navicatess15-sqlserver-en.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dyn...
I'm trying to install Navicat which is an x86-64 binary onto my aarch64 machine, which results in "cannot execute binary file: Exec format error"
Here's the result of running
on the executable:
-sqlserver-en.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=d629f6099d2344ad82818172add1d38c5e11bc6d, stripped
And here is my -a
:
penguin 4.19.98-08076-g24ab33fb8e14 #1 SMP PREEMPT Wed Apr 1 17:17:36 PDT 2020 aarch64 GNU/Linux
Is there any way to run this executable on my machine?
(Idk if this makes any difference but I'm running Linux on my Samsung Chromebook Plus w/ an OP1 processor)
Svavinsky
(151 rep)
Apr 4, 2020, 07:23 PM
• Last activity: Apr 7, 2024, 11:31 PM
113
votes
8
answers
424134
views
#!/bin/bash - no such file or directory
I've created a bash script but when I try to execute it, I get #!/bin/bash no such file or directory I need to run the command: `bash script.sh` for it to work. How can I fix this?
I've created a bash script but when I try to execute it, I get
#!/bin/bash no such file or directory
I need to run the command:
bash script.sh
for it to work.
How can I fix this?
Nicolas de Fontenay
(4483 rep)
Dec 17, 2011, 03:25 PM
• Last activity: Apr 4, 2024, 01:20 PM
Showing page 1 of 20 total questions