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

learn more… | top users | synonyms (6)

35
votes
5answers
62k 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 ...
35
votes
5answers
101k views

How to change the default font size of XTerm?

XTerm font is very small. How can I set it larger?
35
votes
4answers
50k 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 ...
35
votes
4answers
86k 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 ...
35
votes
8answers
20k 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
7answers
80k 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 ...
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 ...
35
votes
2answers
33k 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
3answers
33k 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?
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
21k 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
3answers
38k 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 ...
34
votes
1answer
39k 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 ...
34
votes
3answers
39k 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?
33
votes
2answers
84k views

How to read complete line in 'for' loop with spaces

I am trying to run a for loop for file and I want to display whole line. But instead its displaying last word only. I want the complete line. for j in `cat ./file_wget_med` do echo $j done result ...
33
votes
5answers
114k 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 ...
33
votes
2answers
79k 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 ...
33
votes
2answers
368k 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 ...
33
votes
3answers
34k 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
3answers
26k 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 ...
33
votes
5answers
20k 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)?
32
votes
5answers
18k 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 ...
32
votes
9answers
99k 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 ...
32
votes
6answers
17k 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
10answers
96k 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 ...
32
votes
6answers
185k 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 ...
32
votes
6answers
117k 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
6answers
39k 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.
32
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.
32
votes
3answers
18k 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
4answers
72k 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"?
32
votes
6answers
25k 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?
32
votes
5answers
75k 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
12k 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) ...
31
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 ...
31
votes
5answers
25k 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?
31
votes
2answers
64k 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 ...
31
votes
5answers
49k 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?
31
votes
1answer
37k views

Arrow keys, tab-complete not working

I have installed ubuntu minimal(mini.iso) on my vm. I then used recovery mode to login as root and create an account with useradd -m admin and then set a password with passwd admin. When I login on ...
31
votes
6answers
50k 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 ...
31
votes
5answers
256k 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 ...
31
votes
1answer
28k views

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

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.
31
votes
7answers
40k 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 ...
31
votes
4answers
36k 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
30
votes
4answers
22k views

How to get out of “sudo -s” command in Terminal?

I entered sudo -s command in terminal, and the it changed from shameek@shameek-K55VD:~$ to root@shameek-K55VD:~#. Now when I click on the close terminal window icon it says, "There is still ...
30
votes
3answers
3k views

“mv file” and now it's missing

In a terminal window, I typed: mv filename ..\.. [Note the wrong slash.] Now I can't find it. Gone. I ran some searches and looked through recoverable deleted files. Nothing. Poof. Serves me ...
30
votes
2answers
705 views

What is the reason for using && instead of ; to place to commands on the same line?

Not being an expert in either Linux not Unix I'm wondering what the difference between these 2 method of stringing 2 commands on the same line? I see no difference in output in this simplistic example ...
30
votes
4answers
57k 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)?
30
votes
4answers
5k views

Is the tilde, `~` considered as a relative path?

I'm trying to extract the different part of the Nvidia cuda library installer. I'm using the following command: mkdir ~/Downloads/nvidia_installers ./cuda_6.5.14_linux_64.run ...
30
votes
5answers
29k views

Make gedit embedded terminal colours the same as the default terminal

I've just updated to 11.10 and now my embedded terminal in gedit does not match my default terminal. I hate looking at a white and black terminal. Does anyone know how to make the embedded terminal ...