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

learn more… | top users | synonyms (5)

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
3answers
220k views

How to start GUI from command line?

I've installed the following version of ubuntu om my machine. ubuntu-12.04-desktop-i386.iso But when I switch on the computer, I get command line. Ubuntu 12.04 LTS COMP-1245 tty1 Once I ...
22
votes
6answers
7k 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
5answers
62k views

How can I make a script that opens terminal windows and executes commands in them?

I have three scripts I need to run when I start up my Ubuntu machine, they start services I use in my development environment. To do that, I manually open three terminals and type in the commands. ...
22
votes
6answers
19k 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.)
22
votes
6answers
67k views

How to close vim from the command line?

I know this is more of a general linux question but w/e. So when I enter a program like vim in the command prompt it displays all the text in the file and I can edit it etc. But I can't figure out how ...
22
votes
3answers
31k views

Why does “ps aux | grep x” give better results than “pgrep x”?

I've just tried the following command on my Ubuntu, it doesn't show a thing: pgrep php5 shouldn't it return the process id of php5(which the following command just does)?: ps aux | grep php5 So, ...
22
votes
3answers
19k 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.
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
3answers
138k views

find a file using the terminal

I am trying to find a directory, using the terminal and I am not sure where it is. I mean that i used the wget command to obtain the file and used it for installation and now i am not able to find ...
22
votes
2answers
13k views

What do the various dpkg flags like 'ii' 'rc' mean?

I frequently need to check which packages are installed, and I use the following command: dpkg -l | grep foo which gives the following output Desired=Unknown/Install/Remove/Purge/Hold | ...
22
votes
2answers
16k 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
1answer
17k 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
1answer
6k 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
2answers
28k 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...)
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
5k 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
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
35k views

Where to declare environment variables?

What are correct places for: Global environment variables meant to affect all users? User-specific environment variables?
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
25k 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.
21
votes
10answers
16k 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.?
21
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.
21
votes
8answers
23k 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
1answer
26k views

What do the STAT column values in ps mean?

In the STAT column of ps there are a load of letters that don't really make much sense. What do they mean? Here's an example of ps aux | head: USER PID %CPU %MEM VSZ RSS TTY STAT ...
21
votes
2answers
42k 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 ...
21
votes
4answers
24k 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
20k 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
23k 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
43k 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 ...
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
8answers
54k 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 ...
20
votes
3answers
3k views

Ctrl+L in terminal

I accidentally typed ctrl + L in terminal and my terminal window jumped one 'screenful' size. I looked at the keyboard shortcuts in "Edit"->"Keyboard shortcuts" and didn't find that shortcut. What ...
20
votes
3answers
3k views

Where can I find the command line?

A basic question: Where do I find the command line? There is a lot of information about commands and using the command line, but I'm an absolutely new Ubuntu user: I can't find find the command line. ...
20
votes
2answers
20k 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 ...
20
votes
2answers
3k views

How to change the number of workspaces from the command line?

I'd like to change org.compiz.profiles.unity.plugins.core -> hsize and -> vsize from command line. I thought I could use gsettings set org.compiz.profiles.unity.plugins.core vsize 4 but then ...
20
votes
3answers
18k 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 ...
20
votes
4answers
3k views

What do “.” and “..” mean when in a folder?

when I used ls -a to view hidden files in folder there were 2 hidden files created by default what is the significance of this two files . and ..? ls -a Produces . ..
20
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 ...
20
votes
2answers
11k views

How can I hibernate/suspend from the command line and do so at a specific time

I managed to find out how to suspend/hibernate the system from the command line by reading How can I suspend/hibernate from command line?. However, I would like to know how to use the command line to ...
19
votes
5answers
2k views

Unable to remove a file which has a name like a command argument [duplicate]

I inadvertently created a file called -r in my home directory. Now I cannot get rid of it: rm -rf rm: missing operand Try 'rm --help' for more information. Other attempts: rm /-/r rm: cannot ...
19
votes
2answers
2k views

Why I can find *main.o but cannot *.o?

This one is correct: $ find . -name *main.o ./main.o So, why I can't find *.o? $ find . -name *.o find: paths must precede expression: main.o Usage: find [-H] [-L] [-P] [-Olevel] [-D ...
19
votes
2answers
127k 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?
19
votes
5answers
9k views

How to open a file manager of the current directory in the terminal?

When I work in terminal, sometimes I want to open the current directory in a GUI file manager. And then to click the items in the window to run the application. How can I do this?
19
votes
2answers
1k views

How do I run an application with arguments from the command line without losing the terminal?

I use dwm as a window manager on Ubuntu, I like tiled windows and I like them as few as possible. I sometimes need to run an application (let's say it's the pdf viewer mupdf in x11) from the terminal, ...
19
votes
3answers
9k views

How to show ascii art at the top of the terminal when it's opened?

As you can see on this screeshot of Mik's Guake he have a statup message of ascii art when he opens it, and that's what I'd like to do, can someone help me?
19
votes
2answers
825 views

Why does it take so long for Ubuntu to say “command not found”

For some reason, with my setup, it can take Ubuntu several seconds to respond with "command not found" when I accidentally typo a command. Why does it take so long? Is there any way to shorten the ...