Questions relating to the execution (running) of a file (usually a compiled binary) or a command.

learn more… | top users | synonyms

103
votes
10answers
78k 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?
35
votes
1answer
2k views

Why do some programs running from Terminal using '&' close when Terminal does and others do not?

I was just wondering, for instance when I launch qtox with: qtox & And then close Terminal, qtox closes with it. However when running etherape using: sudo etherape & Closing Terminal ...
24
votes
3answers
1k 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 ...
19
votes
3answers
57k 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 # ...
18
votes
3answers
2k 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" ...
14
votes
6answers
836 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 ...
13
votes
4answers
47k 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 ...
13
votes
2answers
15k views

How do I change the launcher commands?

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
11
votes
2answers
407 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 ...
10
votes
5answers
18k views

Execute command before shutdown/reboot

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 ...
10
votes
1answer
960 views

What does this “… | ps `cat`” command do?

On my Internet research, I found the following command as solution to find the process name of a window: xprop _NET_WM_PID | sed 's/_NET_WM_PID(CARDINAL) = //' | ps `cat` I just do not understand ...
9
votes
1answer
352 views

How to check what command is taken?

I have a shell script called foo.sh in /usr/local/sbin. Besides I use another script with the same name. It is stored in /home/user/scripts. Both paths belong to PATH. How can I find out, which one ...
7
votes
2answers
4k 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 ...
7
votes
1answer
1k 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 ...
5
votes
4answers
604 views

What is use of command: `command`?

Recently I found command: command which has no manual entry but help displays as follows: $ help command command: command [-pVv] command [arg ...] Execute a simple command or display information ...
5
votes
5answers
541 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 ...
5
votes
0answers
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?
4
votes
2answers
10k 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. ...
4
votes
2answers
109 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
1answer
2k 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. ...
4
votes
1answer
82 views

How to execute a command after a certain period of inactivity, triggered by keyboard & mouse activity and full screen window?

My machine suspends after 5 minutes of inactivity, however I want to execute a command as well after 4 minutes and 30 seconds of inactivity. Is there a way to run a command after 4 minutes and 30 ...
3
votes
4answers
886 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 ...
3
votes
2answers
78k views

Copying file from folder 1 to folder 2 in terminal

I am trying to move a text file from folder 1 to folder 2 via terminal. I'm doing this for a school project to show what actually happens when you copy paste. I'm doing cp/home/rits/desktop/folder1 ...
3
votes
2answers
261 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?
3
votes
1answer
617 views

Why some server requires './' to run scripts but others don't?

I'm wondering why some Ubuntu servers are different. I have two Ubuntu 12.04 server which are running a web application. Today I tried to run an sh file from its folder. Server 1 can run shell ...
3
votes
1answer
4k views

How to automate execution of commands in separate terminals?

I am new to LINUX operating system. I am using ROS (Robotic Operating System) where I type few commands in separate terminal windows for doing the setup. ie Before I run my program, I have to do ...
3
votes
1answer
4k views

vim command does not work

I am trying to open vim on my Ubuntu 14.04 64 bit by entering the command in the terminal : vim But i get the response : The program 'vim' can be found in the following packages: * vim * ...
3
votes
1answer
30 views

how to set some application to run only as root

I'm running Ubuntu 14.04 and I was wondering is there a way to set some applications to run only as root? for example the application X can normally executed by any user, and I want to set it to be ...
3
votes
3answers
489 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 ...
3
votes
0answers
21 views

How to only allow a file to be opened or executed by certain application(s)?

Let's say that I've got a security application (or something which I just don't want any old application or user to have access to because it is very important and if the wrong guys had access to it ...
3
votes
0answers
11 views

How to run a command at startup with systemd? [duplicate]

I've got a specific command which I want to run at startup, I am running Ubuntu GNOME 15.10 with GNOME 3.18 with systemd. But after searching I can only seem to find ways of doing it through upstart. ...
2
votes
2answers
148 views

Command to exit and then relaunch gnome-terminal that can be executed from gnome-terminal?

I was wondering if it is possible to sort of restart gnome-terminal from itself? What I mean by that is, is there a command which I can use to tell gnome-terminal to close and then immediately ...
2
votes
2answers
6k views

not able to execute .sh file

I downloaded modelsim install file which contained .sh file in it -setup.sh I did the following two things Right click->properties->permision->allow executing file as program ->double clicked the ...
2
votes
2answers
3k views

how can I add a command in terminal to open a file

I save a file Logisim2.7.1.jar in my directory at /home/danny/Application. Whenever I want to run this file in terminal, i have to type these following line in terminal: cd /home/danny/Application ...
2
votes
1answer
48k views

What does 'chmod +x <filename>' and how do I use it? [closed]

I want to write a 'batch file', but I don't know how to use chmod +x <filename> command, nor where to use it.
2
votes
2answers
161 views

root@mickey:/#su goofy && ssh goofy.com — why does this fail?

mickey (who is logged in as root) tries to use goofy's account to ssh into goofy.com. root@mickey:/#su goofy && ssh goofy.com however this fails to login goofy on goofy.com, instead: ...
2
votes
1answer
234 views

Where are key press scripts stored?

When I hit the Volume Up multimedia key, I receive the following output from xev. KeyRelease event, serial 38, synthetic NO, window 0x4200001, root 0x91, subw 0x0, time 100844850, (1037,434), ...
2
votes
1answer
10k 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. # ...
2
votes
1answer
3k 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.
2
votes
1answer
94 views

What is the difference between -exec with '{}' ';' and -exec with {} /;?

While trying my hand at writing some bash scripts I've come across various usage of the -exec parameter. In my context, I'm using it after the find command. This guide states to use {} /; after the ...
2
votes
2answers
2k views

difference between mkisofs and genisoimage

Is There any changes in mkisofs, Previously for creating iso I have used mkisofs, but now it is taking gensioimage ? With mkisofs my work going good, but genisoimage I am facing problems with ...
2
votes
2answers
113 views

How to start a program without interrupting my current session?

I'am working on some code or document and I need an additional program like IntellJ e.g. How can I start this program in the background without popping up and interrupting me on my work? Often I start ...
1
vote
2answers
11k 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 ...
1
vote
1answer
223 views

View audio files by length - command line?

Is there a command(s) to view audio files sorted by length in the command-line? For example the shortest to longest?
1
vote
4answers
113 views

Is there anything that can let me run 64bit binary executable files? [duplicate]

Is there anything in ubuntu 32 bit 14.04LTS something light, that will let me execute 64 bit binary executable files? Architecture: i686 CPU op-mode(s): 32-bit, 64-bit Byte Order: ...
1
vote
2answers
528 views

Find and exec in found folder

I'm trying to find files containing *.nef and move them to a subdirectory name NEF of the folder in which the file is found. I've started testing with the following command, but this always copies to ...
1
vote
3answers
317 views

Help creating a messagebox notification with yes/no options before an application runs

I started using Ubuntu alongside Windows about 2 months ago. I've slowly been adding all of the programs that I use regularly to Ubuntu, so that I will eventually be able to do everything in Ubuntu ...
1
vote
1answer
138 views

How to add a python script as a terminal command? [duplicate]

Lets say I have a script which creates a file and writes something into it (but could be anything). It could be a script that runs a set of xrandr commands to set a resolution, for example. Is there ...
1
vote
1answer
74 views

How to allow scrolling to view complete command output in the command-line?

An example: When I enter compgen -c to view all possible terminal commands I get something like this: ll ls which if then else elif fi case esac for select while until do done and quite a bit ...
1
vote
1answer
219 views

write a bash which open firefox on every ten minute

Is it possible to write an script which do a specific command every ten minute? I do not know if this is a loop? For example Every ten minute delete a file name foo on the home directory? or every ...