Questions tagged [execute-command]
Questions relating to the execution (running) of a file (usually a compiled binary) or a command.
39
questions
180
votes
12
answers
219k
views
How do I run executable scripts in Nautilus?
When I double-click on a script in Nautilus to run it, the script just opens in my text editor with no option to run it. Using Nautilus, how do I run executable text files and/or scripts?
501
votes
16
answers
4.3m
views
How do I run .sh scripts?
Whenever I open a .sh file, it opens it in gedit instead of the terminal. I can't find any option similar to Right Click → Open With → Other Application... → Terminal.
How do I open this file in the ...
30
votes
5
answers
123k
views
Execute command before shutdown/reboot [duplicate]
I have a machine running a couple of vagrant VM. The problem I have is that sometimes I forget to shutdown those VM before I shutdown or reboot my machine. Because of that my machine get stuck with ...
23
votes
3
answers
44k
views
How do I run a command?
I am a new user, who has just been told to run / execute a command. The answer has some text with a grey background like this text here or
sometimes this text here.
However, I don't know what "run" ...
46
votes
8
answers
246k
views
Run command on another(new) terminal window
How to run any command in another terminal window?
Example: I opened one terminal window and if I run command like apropos editor, then it run and out-puts on that window. But I want to run same ...
36
votes
4
answers
137k
views
Why doesn't rc.local run all my commands, and what can I do about it?
I have the following rc.local script:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# ...
13
votes
2
answers
30k
views
How to get sudo to prompt you for a password each time
I find that if I execute something using sudo that then if I execute something else soon after also using sudo, that it does not prompt me for my password, and although this can be inconvenient in ...
81
votes
6
answers
42k
views
What is the bash command: `command`?
The command command has no manual entry but help displays as follows:
$ help command
command: command [-pVv] command [arg ...]
Execute a simple command or display information about commands.
...
5
votes
0
answers
4k
views
How do I run executable scripts in Nautilus rather than open them in Gedit text editor? [duplicate]
When I double-click on a script in Nautilus in order to run it, the script opens in my text editor with no option to do so.
Using Nautilus, how do I run executable text files and/or scripts?
31
votes
3
answers
23k
views
How do I run a sudo command needing password input in the background?
I have recently disabled sudo's authentication caching ability so that it now prompts me for a password every time.
And though this is good for security, it has caused one slight problem which I ...
8
votes
2
answers
16k
views
Execute command from file in current shell [duplicate]
I want to executed command from file (which is script) in current shell in terminal.
Example: I have file ch_dir contains following:
#!/bin/bash
cd /usr
Now if I execute file usually as following ...
94
votes
3
answers
840k
views
What does "chmod +x <filename>" do and how do I use it?
I want to write the Ubuntu analogue of a "batch file" (a shell script). But I don't know how to use chmod +x filename command to make it so that the script can be run. Nor do I know where to use it.
26
votes
3
answers
75k
views
Pausing a long running program in the terminal?
Is there a keyboard key combination that I can use to pause a program running in the terminal? In case it matters, I don't intend to run anything else inside that terminal while the program is paused. ...
3
votes
4
answers
3k
views
Add to path only sh file not a dir
I have a bin folder with a bunch of sh files. For example "server-run.sh", "server-stop.sh", "server-do-something.sh". And I want to run file "server-stop.sh" from anywhere. I could add this bin ...
22
votes
2
answers
99k
views
Extract A Squashfs To An Existing Directory
I have an Ubuntu installation backed up as a .squashfs file. I would like to extract it to the root of a partition, but when I try gives me an error saying the directory exists. I can extract just ...
19
votes
2
answers
41k
views
How do I change the launcher commands? [duplicate]
I'd like to change the behaviour of the launcher, so that if I click on the firefox icon, it runs the command
$ optirun firefox
Does anyone know how to change it?
Thank you
6
votes
3
answers
2k
views
Is there any difference between run command in terminal & ALT+F2
For running direct commands, there are two ways.
Either run in Terminal
Or run from the "Run Command" dialogue (screen shown below) obtained from Alt+F2
Then, Is there any difference between them? (...
3
votes
1
answer
9k
views
Whitespace in command alias
For example, I want to make a command good night and this would look something like alias good night="many many many commands here". I tried this but, whitespace is not allowed. Is there any way I ...
3
votes
1
answer
6k
views
What does "exec 1>/var/opt/log/my_logs/MYPROG_`date '+%Y%m%d_%H%M%S'`.log 2>&1" do?
I'm trying to understand what the below piece of shell script is doing. I know that exec without any arguments redirect the output of the current shell but am not able to understand what the below ...
3
votes
1
answer
13k
views
Unable to change execute permissions of .sh file [duplicate]
I'm out with a new problem. I've downloaded a jdk7.sh file. Now I'm unable to change the permission of the file to allow executing the file as a program. I mark the check box and again it disappears.
0
votes
1
answer
829
views
Path to shell script in aliases with ./
I'm trying to make an alias for my shell script which is saved in ~/Dokumente/music.sh
Therefore, I added following line to ~/.bash_aliases:
alias music='.//home/robin/Dokumente/music.sh'
After ...
0
votes
1
answer
713
views
Command output is not redirected to file
I want to execute the following command, which is related to Rational ClearCase. The output of this command should be redirected to the file
testout.
Command
rgy_check -vobs > testout
Output
...
21
votes
1
answer
10k
views
When will Wayland support restarting the shell by command?
On Xorg I found that doing ALT + F2 and then doing r would work in order to restart gnome-shell after an update, however with Wayland on Ubuntu GNOME 17.04 and GNOME 3.24 I have found that I get a ...
14
votes
6
answers
1k
views
Most efficient way of launching and separating a program from the terminal? [duplicate]
I'm trying to launch a program from the Terminal in such a way that the following occurs:
Closing the Terminal does not close the program
The program is not outputting anything to the Terminal while ...
10
votes
3
answers
777
views
Run command inside application
On Ubuntu 16.04, I had a keyboard shortcut (Alt+F1) that would open a menu to run a command of a specific application.
For instance, if I were using LibreOffice Calc's, I could do Alt+F1, type "...
8
votes
2
answers
6k
views
How to make it so that a file can only be executed by root, but not as root?
There are certain applications that I don't want people to be able to open unless they have root privileges, however I do not want to give the programs root privileges. So how can I make it so that ...
5
votes
3
answers
3k
views
Is executable permission mode S used for anything?
If you add the setuid bit for a file's permission where you have execute permission, it changes the x to an s to mean that if you execute that file, it will execute as the owner of the file rather ...
5
votes
5
answers
908
views
Needed simple script/loop/command for input command, execute and output within textfiles
Suppose I have list of commands in text file as below (cat cmdlist.txt):-
cut
lshw
top
awk
sensors
Now I want to get simple information on that command by whatis cut, whatis lshw etc. respectively ...
4
votes
1
answer
21k
views
rc.local won't execute the script
This is my rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
#...
4
votes
2
answers
248
views
How can I access the locational data of the currently selected file or folder?
I want to be able to select a file, run a script with a shortcut and that script gets the path of the file I've selected (or am dragging). I've selected it in nautilus.
I know how to run the command, ...
4
votes
1
answer
3k
views
How to run - from Firefox context menu - terminal commands selected in web pages?
Instead of copying it from the web and pasting it in the terminal, I want to be able to select a command displayed in a web page and with right click context menu to add it and run it in terminal.
...
3
votes
2
answers
749
views
What is the difference between `command` and `./command`?
I found that sometime I use the command to run a command, but sometime I use the ./command to run another command.
What is the difference?
1
vote
1
answer
762
views
Making an executable program with a shell script..?
I made two shell (.sh) script files, audio.sh and video.sh for my Pi CCTV project.
And I combined those two scripts:
sh -x video.sh & sh -x audio.sh &
I put the command above into a shell ...
1
vote
2
answers
2k
views
How to run executables directly from nautilus? [duplicate]
When I write C codes in geany and the build and then run the program from there using the buttons there, it works fine. Again I can run the compiled executables using ./file_name command from terminal ...
0
votes
1
answer
171
views
set: pipefail failing on WSL windows 11 ubuntu 22.04.3
i am currently having an issue with running a .sh file which can be found in here
https://github.com/grugslair/Rising-Revenant/blob/dev/contracts/scripts/default_auth.sh
i was originally dual booting ...
0
votes
1
answer
2k
views
How to correctly install LibreOffice using FlatPak to have libreoffice command in $PATH environment variable?
I have just removed deb-packages of LibreOffice from my Ubuntu 16.04 LTS system with
sudo apt purge --auto-remove $(dpkg -l | grep "^ii libreoffice" | awk '{print $2}')
To replace it with ...
0
votes
1
answer
2k
views
ldd 32-bit exe / 64-bit OS
I need explanation about this on my 64-bit Xubuntu :
ldd /home/isa/Downloads/Fusion/Fusion
not a dynamic executable
But strace it : [...]libgtk-x11-2.0.so.0: cannot open shared object file: No such ...
0
votes
1
answer
436
views
So many user apps, but only a few on launcher, why not a launcher page or a command to install on launcher? [duplicate]
I am new to Ubuntu, have v. 14.04. I look on installed apps page and see user apps installed but find no way to access them, and no way to place an app link in the launcher, why is this? People would ...
-4
votes
4
answers
1k
views
How to automatically execute a command every time a certain command terminates?
Example: Once the add-apt-repository process has terminated, immediately run apt-get update - without having to enter the command manually.
Is there a way to do this? Is it possible to set such a ...