Questions about using the command-line interface (CLI).

learn more… | top users | synonyms (5)

24
votes
3answers
18k views

Bash history handling with multiple terminals

I use mainly Terminator, and it's usually opened with 3 split terminal windows. I also use Gnome terminal for various reasons. I'm wondering how is bash history handled in this case as I sometimes ...
24
votes
2answers
20k views

How do I disable the blank console “screensaver” on Ubuntu Server?

How to disable blank screensaver on Ubuntu Server? There's no desktop or X, only console (command-line interface).
24
votes
5answers
44k views

How can I find out if a specific program is installed? [duplicate]

I want to find out if a program - Chromium for example - is installed on Ubuntu or not. Manually or as a package. How do I know if a program is installed via command line?
24
votes
5answers
9k views

Switch command output language from native language to english

How can I switch the command output language from my native language to English, so I can post my Ask Ubuntu question with English command output (error messages)?
24
votes
4answers
38k views

What is the proper terminal-way to shutdown?

I was trying to shutdown my PC through SSH. I executed sudo shutdown now The user was logged-out and Ubuntu starting turning off, but it froze at the last screen with the Ubuntu logo and the loading ...
23
votes
4answers
38k views

Where to declare environment variables?

What are correct places for: Global environment variables meant to affect all users? User-specific environment variables?
23
votes
6answers
22k views

Command to see media file info in terminal?

I need a command to quickly see in terminal essential information about an audio or video file. (Then I'll consider adding that to Thunar's custom actions, etc.)
23
votes
3answers
20k views

How can I convert a ppt to a pdf from the command line?

I have a folder containing a bunch of ppts, each of which I'd like to convert to an individual pdf. I'm using Ubuntu 10.04 with whatever comes installed on it.
23
votes
3answers
7k views

Redirect the output using `sudo` [duplicate]

I have a small question regarding using sudo with output redirect >. To enable IP forwrding, someone can use the command: echo 1 > /proc/sys/net/ipv4/ip_forward Executing this command will ...
23
votes
2answers
46k views

How do I change mirrors in Ubuntu Server from regional to main?

I have a Lucid Server (10.04) set up and I would like to change the mirror from US (or any other country) to the Main Ubuntu Mirror. For example my two first entries in sources.list are: deb ...
23
votes
3answers
3k views

Command-line equivalences of some tasks in Synaptic

I already use apt-get for most of my package management. Yet, there are times when I occasionally need to use Synaptic to do certain things. I would like to learn the equivalent commands for doing the ...
23
votes
3answers
16k views

Changing colors for user, host, directory information in terminal command prompt

Is it possible to change the colors in the command prompt for the user@computer, as well as the the current directory and command parts of the prompt display? I've already seen something like this ...
23
votes
2answers
5k views

What does `~/ ` mean?

I'm new to Linux and Ubuntu. People keep using ~/filename in their answers to my questions. What does ~/ mean?
23
votes
3answers
6k views

What is the maximum length of command line arguments in gnome-terminal?

What is the maximum length of command line arguments in gnome-terminal? ... and is there a system environment variable which reports this value?
23
votes
2answers
10k views

What does “%U” mean when calling a command?

When editing the Applications menu, I see for some applications, their commands have “%U” such as "gedit %U" and "gnome-mplayer %U", but others don't such as "gcalctool". I was wondering What“%U” ...
23
votes
1answer
7k views

How do I pipe terminal standard output (stdout) to the clipboard?

For example, Say I want to list the contents of a folder and directly paste them into a chat window for a friend to see. I realize I could do ls > filename.txt to create a file (filename.txt) ...
22
votes
6answers
8k views

How can I create an alias for cd and ls?

I frequently run the ls command after running the cd command. How can I create an alias (like cs) for this operation?
22
votes
9answers
59k views

How to remove all files and subdirectories in a directory WITHOUT deleting the directory in bash?

Is there a command to remove all files and subdirectories in a directory WITHOUT deleting the directory? For example if I have directory "dontDeleteMe" with subdirectories "1", "2", "3" and each ...
22
votes
4answers
27k views

Take a picture from terminal

I want to be able to take a picture using the webcam from the terminal. this image then will be send to a specific directory. How can this be done.
22
votes
4answers
7k views

How can I list all packages I've installed from a particular PPA?

How can I list all packages I've installed from a particular PPA? Command-line answers preferred. Related question: how can I list all installed packages that are not available from the main Ubuntu ...
22
votes
10answers
17k views

Command line audio players

What are popular audio players for the command line? How to play a single sound file? Are there command line players that also index the music library like Banshee, Exaile, etc.?
22
votes
2answers
17k views

How to edit pdf metadata from command line?

I need a command line tool for editing metadata of pdf-files. I'm using a Aiptek MyNote Premium tablet for writing my notes and minutes on this device, import them later and convert them to pdf ...
22
votes
3answers
9k views

Is there an offline command-line dictionary?

Is there any command line offline dictionary? I know that there are some like StarDict and Artha but how about one in the command line? Also, I tried dict but it is an online dictionary.
22
votes
3answers
21k views

How can I measure the execution time of a terminal process?

I'm trying to measure the execution time of a process that I call via the command line (i.e., I want to find out how long it takes to for the process to finish). Is there any command that I can add to ...
22
votes
1answer
18k views

How can I find out what RAM a computer system has?

I'm looking for a way to find out what kind of RAM a system has (clocking speed, DDR-X etc.). Is there a specific command for that? I'm only aware of free or lspci which don't offer those things.
22
votes
7answers
26k views

How do I navigate to a samba location I've mounted in Nautilus on the command line?

Please note: I am two weeks old in Linux. I have found a lot of answers to this question on the internet, tried many, but all failed one way or another. Therefore I dare to ask once again in the hope ...
22
votes
2answers
30k views

How do I extract a password protected .7z file?

Can someone tell me how can I extract a password protected .7z file in Ubuntu server? (I know the password, I just need a program to do so and an example of how to use said program...)
22
votes
1answer
46k views

How do I change the language via a terminal?

Using system settings I changed my language to Arabic and deleted the English language from the settings. Then the computer lagged and it logged out - now I can't log back in because the login is in ...
21
votes
5answers
3k views

How to both display a command line's output on console and save the output into a text file?

How can I run sudo apt-get install by BOTH seeing the process of installation (long in my case) and saving its output into a text file ?
21
votes
3answers
3k views

Why does “A=10 echo $A” not print 10?

This command: A=10 echo $A prints an empty line. Why not 10? Why doesn't the in-place temporary environment setting work? I want to know the reason and explanation rather than solution. I used ...
21
votes
5answers
6k views

Search function in the terminal?

I have written a program that outputs a lot of text to the terminal. I am looking for certain words in the text to see if I have done it right, but simply reading the text is impossible. Are there ...
21
votes
2answers
141k views

I want to copy a directory from one place to another via the command line

I want to copy a directory from one place to another folder. sudo cp is the command, but after that what should I type? The destination or source first?
21
votes
5answers
3k views

Displaying a “scrolling” log file

Via command line, I have a log file I'd like to keep track of. What I want is to have, basically, a tail that refreshes when the log is updated making the text scroll upwards as new lines are ...
21
votes
4answers
3k views

Can one pick up a running application from terminal?

Sometime I need to run an application from terminal for debugging. If I am sure the bug will occur short after launching the application, I can run this application from the Terminal. However, bugs ...
21
votes
5answers
1k views

How to view multiple files in single terminal?

Sometimes I may need to access multiple log files for troubleshooting , but I don't want to open them in different terminals. What I want is to open them in same terminal. Is there any way I can ...
21
votes
4answers
74k views

How do I move all files from one folder to another using the command line?

I would like to know how could I move all files from a folder to another folder with a command line. Let's say I'm in my Downloads folder and there are a 100 files that I would like to move to my ...
21
votes
2answers
5k views

How does this [t]ricky bracket expression in grep work?

I saw this one-liner recently: $ ps -ef | grep [f]irefox thorsen 16730 1 1 Jun19 ? 00:27:27 /usr/lib/firefox/firefox ... So it seems to return the list of processes with "firefox" ...
21
votes
2answers
23k views

How to resize an image through the terminal?

I have Ubuntu 10.04. I have converted image through terminal using the following command: convert myfigure.png myfigure.jpg. But I want to resize the height and width of the converted image. Is ...
21
votes
4answers
67k views

How to detach a screen on a terminal?

Maybe this is a dumb question. I know how to start a screen or how to list different screens. screen -ls or to attached.. There are screens on: 2477.pts-0.server1 (Detached) ...
21
votes
8answers
25k views

How does one find out the command line corresponding to GUI app (eg, LibreOffice Writer)?

How can I run LibreOffice Writer from the command line? Basically, what is its command and how do I get to know what's the command to run a particular application in general?
21
votes
2answers
1k views

Does using -v (verbose) slow commands down?

In this question: How to remove all files and subdirectories in a directory WITHOUT deleting the directory in bash? it is asked how to delete all file in a folder, and not the folder itself. Matts ...
21
votes
3answers
5k views

How to find the number of packages needing update from the command line?

I'm working on some system admin automation using fabric and I'd like to be able to monitor the number of packages that need upgrading on a given machine. This is the same information that I can see ...
21
votes
4answers
27k views

How do I burn a DVD ISO using the terminal?

I have a DVD ISO file and i want to burn through the terminal . We have many command formats but i am unable to choose the best & safe one . so please give me a best command to burn the ISO ...
21
votes
6answers
21k views

Can I use NetworkManager without a tray/dock/bar?

I would like to use NetworkManager, but prefer a keyboard driven window manager that provides as much space on the screen as possible for my code. I just hate that little strip of real estate "trays" ...
21
votes
3answers
28k views

How to find and list all the symbolic links created for a particular file?

I had created many symbolic links on various paths for a particular file or a directory. I want the whole list of created symbolic links paths (location). Example: I created symbolic links for ...
21
votes
1answer
15k views

Bash: delete word ahead of cursor

Consider the following bash prompt, where ^ denotes the prompt location: svn commit -m very/long/path/to/some/file "[bug 123456] Fix the pixel issue" ^ I'd like to commit a different ...
20
votes
4answers
3k views

Why wouldn't `which` command work for `cd`? Can't find the executable `cd` too!

I tried which cd and it didn't give a path but instead returned the exit code 1 (checked with echo $?). The coreutil cd itself is working, so the executable should be there right? I also ran a find ...
20
votes
5answers
44k views

Automatically enter input in command line

I'm running a script that it requests entering 'y' on each operation, I am looking for a solution like $ ./script < echo 'yyyyyyyyyyyyyy' to pass all my inputs in one time.
20
votes
5answers
18k views

How do I download the command-line emacs instead of the GUI one?

I used sudo apt-get install emacs to download emacs. I expected the command-line emacs to start when I ran emacs but instead the GUI emacs started. How can I download the command-line emacs?
20
votes
4answers
35k views

How do I save terminal output to a file?

How do I save the output of a command to a file? Is there a way without using any software? I would like to know how.