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

learn more… | top users | synonyms (6)

38
votes
3answers
38k views

How to print the directory tree in terminal

What is the command that can be used to draw the directory tree inside the terminal emulator?
38
votes
2answers
82k views

connect to wifi from command line

Other posts seems to be addressing more complicated network connection issues from the command line. The Unity panel Network indicator/button doesn't respond too well sometimes - it keeps trying to ...
38
votes
5answers
16k 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.
38
votes
3answers
28k 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 ...
37
votes
4answers
227k views

How to edit files in a terminal with nano?

Sometimes, a graphical text editor like gedit or kate cannot be used (because you're in a virtual console for example). Luckily, there are text editors for the terminal. An easy one is nano, but I ...
37
votes
3answers
28k views

How to open Nautilus at current command line directory?

I was wondering if anybody knew a command that would allow me to open a Nautilus (if that's the right name for the Ubuntu 12.04 graphic/window explorer) window from the command line at the current ...
37
votes
5answers
22k 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)?
36
votes
5answers
108k views

How to change the default font size of XTerm?

XTerm font is very small. How can I set it larger?
36
votes
5answers
65k views

How to change extension of multiple files from command line?

I have many files with .abc extension and want to change them to .edefg How to do this from command line ? EDIT: I have a root folder with many sub-folders, so the solution should work -r recursively....
36
votes
4answers
58k views

Why doesn't running “sudo shutdown now” shutdown?

When I issue the following: sudo shutdown now ..my newly commissioned Ubuntu 14.04 server doesn't shutdown. It stops with the following message: * Stopping System V runlevel compatibility Give ...
36
votes
4answers
91k views

How to delete or replace an already created symbolic link?

I am working on my project using network simulator2. I installed it and everything is fine. I attempted to create a symbolic link between this installation and /usr/bin, so I could invoke the software ...
36
votes
7answers
42k views

Command line tool to crop PDF files

I am looking for an open source command line tool to crop PDF file just like we can do in Adobe Acrobat Pro. I have tried PdfTk, ImageMagick, PyPDF, and GhostScript—all with no success so far.
36
votes
7answers
85k views

Can you set passwords in .ssh/config to allow automatic login?

I'm using ubuntu 11.10. I'm using ssh for connecting to many servers daily, so i put their parameters in .ssh/config file; like this : Host Home User netmoon Port 22 HostName test.com Is there a ...
36
votes
6answers
27k views

How to find out the terminal command of an application?

I want to use some applications shown on the Unity Launcher in a terminal, but I need to know the appropriate command to run them. How can I achieve that?
36
votes
1answer
41k views

What's the difference between ddrescue, gddrescue, and dd_rescue?

The dd command is commonly used to make image backups of a drive or partition. However, it performs poorly if the source drive is unreliable or failing. I read that ddrescue/dd_rescue is a good tool ...
36
votes
3answers
42k views

Undo functionality in nano

I use the commmand line text editor nano. How do I undo an action while editing text? For example: I typed some text and then changed my mind. Now I want to return to previous state. How?
35
votes
5answers
128k views

How to install Virtualbox from command line?

OK, I a am a newbie. For some reasons, I need to install Virtualbox. I see that I can easily install it using the Software Center, but I trust most the "apt-get install blahblah" way, because I find ...
35
votes
4answers
65k views

How can I find my User ID (UID) from terminal?

The title says it all. What command I need to run from a terminal to find my user ID (UID)?
35
votes
8answers
21k views

What terminal emulators are available for heavy terminal users?

I spend a lot of time at the command-line during the workday and at home too since I run Ubuntu exclusively. I've been using the default gnome terminal but I've reached a point where I'd really like ...
35
votes
2answers
382k views

How do I open a terminal? [duplicate]

Possible Duplicate: What is a terminal and how do I open and use it? How do I access the Terminal? I just got ubuntu running on my computer and now I am ready to write a program...but I can'...
35
votes
4answers
80k views

How to remove lines from the text file containing specific words through terminal?

How to remove all the lines from the text file containing the words "cat" and "rat"?
35
votes
5answers
275k views

How do I remove a folder?

I'm a new user and Im trying to remove a specific folder. I am using sudo rm /path/ but its not working. What is the correct command to use? It is a file catolog I am attempting to remove but im ...
35
votes
2answers
35k 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).
34
votes
9answers
105k 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 ...
34
votes
10answers
108k views

How to show only hidden files in Terminal?

I have a directory that contains thousands of files, some of them are hidden. The command ls -a list all files, including hidden ones, but I need just to list hidden files. What command should I use?...
34
votes
2answers
84k 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 http://...
34
votes
7answers
73k views

Mount encrypted volumes from command line?

If I have an encrypted external disk (or an internal disk that is not in fstab), I see an entry for it in Nautilus -- with an entry like "X GB Encrypted Volume". I can click on this volume, and am ...
34
votes
3answers
23k views

How can I open a file when I do not know what command opens it? [duplicate]

Ubuntu noob here. How do I open a file in a working directory? I have already tried ./MyFile.jpg And it replies with bash: ./MyFile.jpg: Permission denied Now, that got me thinking that I had ...
34
votes
8answers
3k views

How to become a Terminal Pro [closed]

There are rumors. These rumors claim that there are nerd on this hell of a planet who don't touch a mouse. They are my heroes :D How can I become such a pro? (I used to know a site, like ...
34
votes
3answers
41k views

Extract part of a video with a one-line command

If I have a video, normally avi, but could be any, and I want to create another one in the same format but just a part, the position i seconds to f seconds into the video, what is the one-line command ...
33
votes
5answers
26k views

Cron.hourly won't run

Ok, So I've made my script, I dropped it in /etc/cron.hourly then I chmod 777 the file but it won't run (automatically). If I manually run it, it works fine. Do I need to do anything else?
33
votes
5answers
19k views

Removing files with a certain extension except one file from terminal

I need to remove all files with .gif extension except one file with name say "filename.gif". What is the optimal way to go about doing this in terminal? The command rm *.gif removes all gif files ...
33
votes
6answers
198k views

How can I execute a .jar file from the terminal

I know that to execute a file, I use the . command, then the file name with a space between them. But I'm trying to execute a .jar file using the . and it does not work. I went into the properties and ...
33
votes
2answers
68k views

How to install all the boost development libraries?

I am having trouble installing boost library completely it fails/skips several things that seem to be key for me to continue on to compiling a program with it. Here is what I get when I install boost,...
33
votes
5answers
15k views

How can I change the default text editor from gedit to vim?

How can I change the default text editor from gedit to vim? When I click on a text file, I want it to open in vim under the terminal instead of gedit.
33
votes
3answers
38k views

Upgrading from the command line? [duplicate]

I would like to know how to upgrade from my current version of Ubuntu to the next stable from the Command line interface?
33
votes
1answer
74k views

How to display all user and groups by command

I want to display 1. All users and 2. All groups in my pc by using command-line. users and groups displays users currently logged and groups a user is in respectively. How to display List of all ...
33
votes
6answers
54k 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 through ...
32
votes
7answers
4k views

How to access bash without a terminal emulator?

Say I've accidentally uninstalled every terminal emulator on my system: xterm, uxterm, gnome-terminal, guake, etc. Is there a way I can access bash without a terminal emulator? One possible way I can ...
32
votes
6answers
18k views

Is there a file explorer/manager for the command line?

I would like to know if there is something like DOS interface for Ubuntu. I mean a "GUI" that can run from the console (for example if you are using Ubuntu Server). Some file explorer like Nautilus ...
32
votes
5answers
30k 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?
32
votes
6answers
123k 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 ...
32
votes
5answers
53k 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 saved to a file. How can this be done?
32
votes
5answers
44k views

Shutdown from terminal without entering password?

I have desktop edition of Ubuntu. I like the Terminal so that that I prefer to shutdown my computer with the shutdown command. However when I type shutdown now it prompts me to enter my password.Is ...
32
votes
3answers
19k views

How do I find the build dependencies of a package?

I'd like to find out which packages sudo apt-get build-dep <package> would install (if I already got some dependencies installed, I'd also like to see those → so running or simulating the ...
32
votes
5answers
81k 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?
32
votes
1answer
13k 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) ...
32
votes
8answers
42k 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 ...
32
votes
4answers
40k views

How to know my GTK version?

I want to know my GTK version (i am working on Ubuntu 11.10) using a command line or any thing
31
votes
7answers
71k views

Home directory not being created

I am trying to understand system administration on Ubuntu. So, as an example, I create a dummy user using sudo useradd -d /home/linda linda and passwd to create the password. I check that an entry ...