Skip to main content

Questions tagged [execute-command]

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

Filter by
Sorted by
Tagged with
507 votes
17 answers
4.4m 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 ...
Alex's user avatar
  • 5,071
180 votes
13 answers
221k 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?
Rob's user avatar
  • 1,839
95 votes
3 answers
864k 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.
user265696's user avatar
83 votes
6 answers
44k 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. ...
Pandya's user avatar
  • 36.1k
47 votes
8 answers
249k 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 ...
Pandya's user avatar
  • 36.1k
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 # ...
Programster's user avatar
  • 5,919
31 votes
3 answers
25k 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 ...
user avatar
30 votes
5 answers
125k 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 ...
SERPRO's user avatar
  • 489
27 votes
1 answer
3k 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 doesn'...
user avatar
26 votes
3 answers
76k 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. ...
a06e's user avatar
  • 13.4k
23 votes
2 answers
103k 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 ...
please delete me's user avatar
23 votes
3 answers
47k 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" ...
Tim's user avatar
  • 33k
21 votes
1 answer
11k 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 ...
user avatar
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
Dox's user avatar
  • 348
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 ...
Evan's user avatar
  • 321
13 votes
3 answers
191k 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 ...
Destro's user avatar
  • 131
13 votes
2 answers
31k 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 ...
user avatar
10 votes
2 answers
3k views

Run the bash script every time when command lines are executed

I am a new Ubuntu/Linux user, I would like to ask a question as my title above. For example, I have a bash file ./script, I would like to make it run automatically when I type any command line. Once ...
Ender Phan's user avatar
10 votes
3 answers
802 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 "...
Arthur Colombini Gusmão's user avatar
10 votes
3 answers
7k views

How do I start Telegram from the command line?

How do I start Telegram messenger from the command line? I have tried "telegram", but it's not that. I have installed Telegram via ppa: ppa:atareao/telegram.
Nickolai Leschov's user avatar
10 votes
1 answer
2k 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 ...
Newbie's user avatar
  • 103
9 votes
1 answer
440 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 ...
null's user avatar
  • 1,241
9 votes
1 answer
863 views

Execute an executable under a dynamically-created AppArmor profile?

I've been looking into the possibility of running commands under dynamically created AppArmor profiles on my Ubuntu Server 16.04.1 LTS. I'm looking for something similar to the macOS sandbox-exec, ...
Alexander O'Mara's user avatar
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 ...
Pandya's user avatar
  • 36.1k
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 ...
user avatar
7 votes
4 answers
12k views

Is there a command to scroll?

Other than using xdotool is there a way to scroll down by a set amount using a command. In other words, what is the scrolling command? I'm not looking for a keyboard shortcut, I want a command for ...
Tim's user avatar
  • 33k
7 votes
1 answer
3k views

To delete the directories using find command

I am using the Linux command to delete the directories from my server. find . ! -name . -type d -mtime +30 -print -delete But the directories are not deleting. Attached the image , please refer. I am ...
Varun K M's user avatar
  • 183
7 votes
2 answers
12k 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 -dvd-...
Bhaskar's user avatar
  • 101
6 votes
3 answers
7k views

How do I modify the reboot command?

I am trying to edit the reboot command to echo a message to the user, but the command itself located in /sbin is compiled. Is it possible to edit the command and have it print something out when the ...
EndenDragon's user avatar
6 votes
3 answers
1k views

How to open a PDF file with "Master PDF Editor" application from terminal?

I want to open a PDF file from terminal. I only know the command xdg-open file-name.xxx to open a file. But once I use this command, it opens the PDF file with the Document Viewer application (Evince)....
Hussain's user avatar
  • 63
6 votes
3 answers
5k views

"jsonlint: command not found", although jsonlint IS installed

I am interested in using jsonlint on commandline in my Ubuntu 16.04 OS. So I executed sudo apt-get install jsonlint and I got Reading package lists... Done Building dependency tree Reading ...
Shy's user avatar
  • 235
6 votes
1 answer
23k 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 * vim-...
faizal's user avatar
  • 2,967
6 votes
2 answers
9k views

How to remove execute permission from all txt files in Ubuntu

I have a Ubuntu 16.04 64 bit desktop in which I had installed wine in the past and later removed it. Now when I try to open txt files in nautilus, in many cases I get a dailouge box saying the file ...
nlern's user avatar
  • 391
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? (...
Pandya's user avatar
  • 36.1k
5 votes
5 answers
914 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 ...
Pandya's user avatar
  • 36.1k
5 votes
1 answer
5k views

Run in terminal not working

I am new to Ubuntu and I was trying to run this script: #!/usr/bin/env bash echo hello world It works fine if I open the terminal first and manually invoke it. Like ./test. I have set "Ask each ...
wingerse's user avatar
  • 153
5 votes
1 answer
4k views

How can I accept virtual box license agreement in Ubuntu(16.04) terminal?

I am new to Ubuntu. I have just installed Ubuntu-16.04 in virtual-box and my host-OS in windows-8.1. I have run this command: sudo apt-get install virtualbox
zoha131's user avatar
  • 165
5 votes
3 answers
19k views

What does 'exec' do?

I recently meant to run the command pkexec, but accidentally managed to run the command exec by itself with no options or arguments. I looked in the man pages for the description of exec, but I still ...
user avatar
5 votes
2 answers
7k 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 ...
fairlynuts's user avatar
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 ...
AJJ's user avatar
  • 872
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?
Olivier Van Bulck's user avatar
4 votes
1 answer
4k 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?
TellMeWhy's user avatar
  • 17.6k
4 votes
2 answers
364 views

Running a program that is installed via aptitude

After a installation via aptitude, how does one actually run the program? (via nautilus or even terminal) for example, i'm now trying to use a program called pulseview. for this i installed a ...
Matthieu Kints van's user avatar
4 votes
2 answers
552 views

Is there any way to control ls output format

I have a directory contains some svg images among its contents. I list them with following ls command to save the output in a file: ls *200px.svg > animList.js The output file looks like: file1-...
SaidbakR's user avatar
  • 789
4 votes
1 answer
9k 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 (...
KARTHIK's user avatar
  • 91
4 votes
2 answers
252 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, ...
Tim's user avatar
  • 33k
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. # #...
user1880779's user avatar
4 votes
1 answer
3k views

20.04: Command / Shortcut to toggle on-screen keyboard?

Currently I'm using Ubuntu 20.04 on my Microsoft Surface. I want to have it so I can toggle the On-Screen keyboard via a command. I specifically mean this keyboard: Currently the only way to do it is ...
Ran Shorowitz's user avatar
4 votes
1 answer
307 views

How to send e-mails from the terminal?

I have a Server where Calculations are being executed, they take sometimes days to finish. I would like to send an e-mail when the job is finished, maybe through a script or even with the |. Before ...
Mc Jorch's user avatar
  • 137
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. ...
user avatar

1
2 3 4 5 6