The permission bit in a file mode that allows a file to be run as a program. Also, questions related the format of program files, and to locating and executing program files.

learn more… | top users | synonyms

1
vote
1answer
27 views

Make a command to remove NetworkManager connections

I’m working in a manufacturing company (small one) and one of our clients required a test using a Linux (Ubuntu) computer, we are testing some wi-fi modules. the test is simple. beforehand: Powering ...
1
vote
2answers
51 views

How to use ln -s to create a command line shortcut?

I have an sh file that I would like to be able to open from the terminal at any time. I would like to type "studio" into the terminal, and have android studio open I recall using ln -s to do this, ...
9
votes
3answers
5k views

Creating Static Binary

I installed an application [ e.g. fdisk ]. But it required libraries for execution. I am looking for utility/tool which will help me to create a static binary from already installed binaries. So that ...
10
votes
2answers
454 views

How does a shell execute a program?

If I compile a program using gcc, and try to execute it from the bash shell, what is the exact sequence of steps followed by bash to execute it ? I know fork(), execve(), loader, dynamic linker (and ...
-1
votes
0answers
16 views

How to use BlueZ tools? [closed]

I successfully compiled bluez-libs-3.36 and bluez-utils-3.36, and got the programs sdptool,hcitool and hciconfig. I copied them to my device and exectued chmod a+x on all three of them. But if I try ...
0
votes
0answers
20 views

strace | Who's making syscalls ? | Where are the instructions?

I've been told that strace is used to track all the system calls made while running an application. I see that there are a lot of system calls made even before the first printf ( now write ) call. ...
0
votes
0answers
669 views

Permission Denied on an Executable File

I am newbie to linux so any help would be greatly appreciated - I tried searching and am having trouble finding an answer. Downloaded a compiled executable file (source written in c) in ubuntu I ...
1
vote
0answers
130 views

Linux Executable with Unknown type asking to be executable every time I run it in Nemo

When I try to open an executable with the type Unknown I get a message saying: "The file 'file name' has no known programs associated with it. If you trust the source of this file, and have ...
33
votes
2answers
742 views

Why and how are some shared libraries runnable, as though they are executables?

On 32-bit Linux systems, invoking this $ /lib/libc.so.6 and on 64-bit systems this $ /lib/x86_64-linux-gnu/libc.so.6 in a shell, provides an output like this: GNU C Library stable release ...
1
vote
1answer
34 views

Can't run c program in other partition

I'm in dual boot with Windows, and i've created a shared ntfs partition. I' ve cloned a project from github, use make to compile it but seems it isn't recognized as runnable. I've added the right ...
2
votes
4answers
683 views

/home/amnesia/myfile: command not found — 64-bit executable, 64-bit kernel

Trying to run an executable file on terminal (I am using Tails live OS), but I keep receiving an error message. I have set permissions already. The command I wrote: sudo ./home/amnesia/myfile I ...
6
votes
1answer
719 views

Can capabilities be used in scripts without setcap'ing the interpreter binary?

Right now I'm using cap_net_bind_service MY_USERNAME in /etc/security/capability.conf. Now I just need to set cap_net_bind_service+i on the interpreter of my favouite scripting language to be able to ...
4
votes
1answer
4k views

Bash Script Permission denied & Bad Interpreter

I'm on a kali linux 64 bit. I have created a python script which takes 2 arguments to start. I don't want to type out every time the exact same paths or search in the history of the commands I used ...
1
vote
1answer
182 views

cannot execute binary file

I have a application that gives the error: nhsupsserver: cannot execute binary file I read some texts and the most speak about an architecture mismatch and executable file. The line that ...
121
votes
8answers
13k views

How to chmod without /usr/bin/chmod?

Today I was told a tale by a Unix trainer, a tale where the root password got leaked to the students, and one of the fellas removed the execute permission from /usr/bin/chmod itself. How do you ...
1
vote
0answers
53 views

“Illegal instruction” on a static MIPS binary

On my MIPS box I'm trying to run a program. I use a cross compiler for mips. When I run my program, I'm getting Illegal instruction I pulled of one binary from it, called cputest. It basically ...
28
votes
4answers
52k views

Why do we use “./” to execute a file?

Why do we use ./filename to execute a file in linux? Why not just enter it like other commands gcc, ls etc...
1
vote
3answers
73 views

Is it possible to start programs (saved in the menu) from the terminal?

Recently I switched over to Linux Mint. I am finally getting the hang of using the terminal, but there is one question that I find myself coming back to: Is it possible to start a program that is ...
4
votes
2answers
2k 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?
102
votes
4answers
23k views

How do I clear Bash's cache of paths to executables?

When I execute a program without specifying the full path to the executable, and Bash must search the directories in $PATH to find the binary, it seems that Bash remembers the path in some sort of ...
1
vote
1answer
48 views

Get executable for any command [duplicate]

I want to know which executable gets executed for any command in bash. Example: I have firefox installed here /usr/bin/firefox, it is in the $PATH alias browser=firefox alias br=browser Now I ...
5
votes
2answers
214 views

Running setuid binary temporarily without setuid?

Currently setting up xpra, which wants to run an X instance as non-root using the dummy driver, but the system Xorg binary is SUID. Since the system auto-updates, I would prefer not making and ...
10
votes
2answers
3k views

Test whether Linux binary is compiled as position independent code

I recently learned that (at least on Fedora and Red Hat Enterprise Linux), executable programs that are compiled as Position Independent Executables (PIE) receive stronger address space randomization ...
35
votes
2answers
22k views

Getting “Not found” message when running a 32-bit binary on a 64-bit system

I have currently a strange problem on debian (wheezy/amd64). I have created a chroot to install a server (i can't give any more detail about it, sorry). Let's call its path /chr_path/. To make things ...
3
votes
4answers
7k views

How to find executable filetypes?

I want to find file types that are executable from the kernel's point of view. As far as I know all the executable files on Linux are ELF files. Thus I tried the following: find * | file | grep ELF ...
5
votes
1answer
58 views

Script started as `source` or `executable`?

Can we determine inside the very script whether it started as source (.) or executable (shebang or something alike)?
1
vote
2answers
51 views

Why does trying to run a python executable return ': No such file or directory' after transferring it to server via FTP? [duplicate]

I'm having an issue where when I transfer a Python file to my VPS via FTP and try to run it using ./foo.py I am returned with the error: : No such file or directory. The error seams to indicate that ...
0
votes
1answer
56 views

Supervisor: no such file or directory even though it is there [duplicate]

I am trying to start supervisor service supervisor start, as root, but it gives me env: /etc/init.d/supervisor: No such file or directory Yet, I can clearly see that file exists: ...
0
votes
1answer
42 views

Can't run tmux although it's installed [duplicate]

I compiled tmux from source on Ubuntu 12.04 and it is installed in /usr/local/bin/tmux by default. However, when I type tmux in terminal I get the following message: $ tmux -bash: /usr/bin/tmux: No ...
7
votes
1answer
69 views

Unable to run an executable built with NASM

I am attempting to assemble the assembly source file below using the following NASM command: nasm -f elf -o test.o test.asm This completes without errors and I then try to link an executable with ...
2
votes
0answers
35 views

What is the mechanism behind my script losing its executable bit after I append to it in a script? [closed]

I am wondering if this is behavior due to SELinux or something else. I have a deploy script that I run and inside, I had sudo chmod +x /etc/rc.local, and some lines later I echo some startup ...
18
votes
6answers
15k views

Can we get compiler information from an elf binary?

Is there some chance to know how a binary was built, under Linux? (and or other Unix) Compiler, version, time, flags etc... I looked at readelf and couldn't find much, but there might be other ways ...
23
votes
1answer
930 views

How does Linux determine what facilities to use to run a (non-text) binary?

I understand that Linux uses shebang line to determine what interpreter to use for scripting languages, but how does it work for binaries? I mean I can run Linux binaries, and having installed both ...
1
vote
4answers
216 views

Is it possible to execute a binary without specifying the full path or the preceding './'?

Outside of a shell, such as running some other process, what does the term current directory mean, and is it possible to execute a binary without specifying the full path or the preceding './', ...
1
vote
0answers
41 views

binary is able to run only when run after creating a symbolic link to it

I am facing a rather strange problem. I have a 32 bit qmake binary placed at a very deep path. So for ease of use I created a link using ln -s /complicated/path/to/qmake ~/qmake I am running a ...
9
votes
1answer
22k views

sudo: unable to execute ./script.sh: no such file or directory

I'm stumped. I have a script in my /home directory which is executable: [user@server ~]$ ll total 4 -rwx------ 1 user user 2608 Jul 15 18:23 qa.sh However, when I attempt to run it with sudo it ...
2
votes
1answer
73 views

Unable to start vscode executable

I downloaded and extracted the VSCode zip. I see the Code binary file, but doubleclicking it in my file manager does nothing. I also tried ./Code in console, but I only get bash: ./Code: cannot ...
0
votes
0answers
44 views

kickstart does not chmod a file in %post section

I have the following code executed in the %post section of a kickstart file for RHEL 6.6. echo '#!/bin/sh' > /root/add_user echo 'if [ $# -lt 1 ]; then echo "no username provided"; exit 1; fi' ...
2
votes
2answers
271 views

Executable script can't run directly from desktop in Arch Linux

Before, I was using Linux Mint and I can run bash script directly from desktop just with chmod the script to executable. For example, I have a script like this: #!/bin/bash VBoxSDL --startvm ...
2
votes
1answer
50 views

set default process and IO priority on Linux for given application/executable

Is it possible to set up some sort of default process and IO priority for given application/executable? I am thinking some sort of FS extended attribute or loadable "policy" of sort?
0
votes
1answer
97 views

Can I run files from Ubuntu in Mint?

I was wondering, since recently I've decided I want to move from Ubuntu 14.04 to XFCE mint linux, if games installed in Ubuntu will run in Mint? I've copied my home folder onto an external hard drive, ...
3
votes
1answer
4k views

What does 'wine: Bad EXE format for Z:\m\Desktop\PortForward Network Utilities.desktop' mean?

Installed wine on Debian to run a Windows exe - specifically the PortForward Network Utilities bundle: http://portforward.com/help/setup_static_ip_address.htm ). Input: wine '/m/PortForward ...
0
votes
1answer
29 views

does not execute a file on os x with $PATH

I have dowloaded blat from here. I have also added in to executable path: PATH=$PATH:/Users/katja/Desktop/MyDocuments/Programms/blat But I can run the program only from the folder where it is ...
2
votes
1answer
102 views

About executing shell script

Suppose I have a shell script file foo.sh. I can do chmod + x foo.sh and change it into an executable file. In Kernighan-Pike: Unix Programming Environment (UP) they show that after this typing ...
0
votes
2answers
100 views

Open/read Unix Executable file [closed]

Is there a native way (no installing or downloading extra stuff) to read a Unix executable file? I just need to read file to see what's in it and learn what I can use it for. What I'm really trying ...
1
vote
1answer
31 views

Gnomes .desktop current path

Im trying to make a desktop file to start Strife but it doesnt work as it should. For the current Path im using this here: '"$(dirname "$1")"' And to run the executable I use this command: '"$(dirname ...
1
vote
2answers
74 views

Why when we run a executable file we need to add ./ ahead? [duplicate]

Say I have a somecommands.sh and I use chmod 777 to make it executable. Why I have to type ./scommand.sh instead of typing just somecommand.sh to run it from its own directory? Does this make any ...
1
vote
1answer
481 views

How to add 'Make executable' and 'Run' entries to Elementary OS file manager context menu?

I know this is to be done by creating a .contractor file in /usr/share/contractor. For example, one like this will add a menu option to open a folder as root. [Contractor Entry] Name=Open folder as ...
14
votes
1answer
17k views

How to convert a shell script into a binary executable?

I want to convert my shell scripts into binary executable so that nobody else could edit or read it. Is there a way to convert it into a binary executable?
2
votes
0answers
37 views

Why won't my python scripts run without the python command when moved from Windows to Linux? [duplicate]

I have some Python files that I wrote on my Windows PC and then sent over to a Linux machine using pscp. They work as intended on Windows, but when I try to execute them on the Linux machine, I always ...