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

learn more… | top users | synonyms (6)

32
votes
4answers
80k 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 ...
32
votes
5answers
90k views

How to change the default font size of XTerm?

XTerm font is very small. How can I set it larger?
32
votes
6answers
37k 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.)
32
votes
4answers
189k 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 ...
32
votes
5answers
14k 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
29k 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?
32
votes
3answers
34k 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 ...
32
votes
2answers
29k 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).
32
votes
2answers
24k 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 ...
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
6answers
16k 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 ...
31
votes
6answers
106k 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 ...
31
votes
5answers
141k views

Create default home directory for existing user in terminal

How do I do this? I created a user without a home directory and now I want to create one. Not just a folder called new_user, I want the default home directory with all it's folders and hidden files, ...
31
votes
3answers
26k 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?
31
votes
3answers
16k 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 ...
31
votes
5answers
226k 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
6answers
23k 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?
31
votes
5answers
67k 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?
31
votes
1answer
36k 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 ...
31
votes
5answers
17k 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)?
30
votes
4answers
20k 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
10answers
79k 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 ...
30
votes
2answers
703 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
4k 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
2answers
59k 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 ...
30
votes
5answers
28k 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 ...
30
votes
4answers
86k views

What does 2>/dev/null mean…?

I want one or two line description about the following command line: grep -i 'abc' content 2>/dev/null
30
votes
2answers
8k views

Why does ls -l output a different size from ls -s?

I can't figure out why I'm getting the following results: ls -l tells me the size of a given file (HISTORY) is "581944": $ ls -l HISTORY -rw-rw-r-- 1 waldir waldir 581944 Feb 22 10:59 HISTORY ls ...
30
votes
4answers
31k 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
29
votes
9answers
89k 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 ...
29
votes
12answers
25k 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.?
29
votes
3answers
24k 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 ...
29
votes
2answers
3k views

Why does the command “xterm xterm” create an infinite recursion?

I am running Ubuntu 14.04 (64 bit). When I first found out about the command xterm, I tried the command xterm xterm, and it started infinitely opening new xterm windows. ctrl + C stops it immediately ...
29
votes
2answers
36k views

How to hide terminal output when executing a command?

When I launch certain programs from the command line like eclipse and document viewer in 11.10 it spews a load of information that seems inconsequential. Also when they are run in the background ...
29
votes
1answer
11k 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) ...
29
votes
1answer
26k 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.
29
votes
7answers
37k 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 ...
28
votes
5answers
23k 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?
28
votes
6answers
166k 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 ...
28
votes
4answers
45k 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)?
28
votes
4answers
14k views

What is the purpose of the -9 option in the kill command?

Is there a difference between kill -9 212121 and kill 212121
28
votes
5answers
44k 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?
28
votes
6answers
34k 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.
28
votes
4answers
57k views

Opening the file browser from terminal

What's the command to open the file browser? I want it so that I can assign a keyboard shortcut to open a specific folder.
28
votes
8answers
11k views

Multiple terminal windows

I develop code. I use terminal alot. I use many terminal windows alot. I hate how tabs look. Any useful applications that allow for multiple terminal use, and streamline my development. allow me to ...
28
votes
2answers
2k views

Why do I get a train when I run 'ls'?

I have recently noticed something odd that I don't like very much: So why am I getting a train upon running ls? And how can I stop this and make it behave normally? Is this an Easter Egg that I ...
28
votes
6answers
7k views

What causes Nautilus to restart whenever I kill it?

In htop, I kill Nautilus, and within one second, it's back, with a new PID! The restarted Nautilus shows in the Processes list, but has no GUI until I manually launch Nautilus... I've heard ...
28
votes
2answers
3k views

Write command in one terminal, see result on other one

I want to run a command foo on one terminal and pass the result to another terminal. Is it possible to do this ?
28
votes
5answers
14k views

Make a sound once process is complete

I have started a long process through a terminal. Is it possible to make the Ubuntu terminal make a sound once the process is complete? This way, I don’t need to keep checking, but will instead be ...