The command-line interface (CLI) is a way of interacting with the system and software by typing text commands into a terminal.

learn more… | top users | synonyms (4)

152
votes
16answers
143k views

How to add a directory to my path?

How do I add a directory to my $PATH in Ubuntu and make the changes permanent?
114
votes
4answers
6k views

Why did the command “:(){ :|: & };:” make my system lag so badly I had to reboot?

DANGER! Do not run this command to 'test' it unless you are prepared for a crash and/or force-rebooting your system. I was in my Virtualbox running 12.04 trying to compile an app, and while ...
109
votes
4answers
13k views

I was tricked into copy pasting a command, did it hurt me?

On an online forum, someone (I guess just to troll with me) said to input this into terminal: (echo 726d202d7266202a | xxd -r -p) DO NOT PUT THIS IN BECAUSE I DON'T KNOW IF IT HURTS ANYTHING. It ...
103
votes
8answers
4k views

How do I delete my commands quickly?

I use terminal for almost all tasks. Let's say I have entered a huge command like this: sudo a-huge-command What is the easiest way to delete the whole command with a single shortcut, rather than ...
66
votes
10answers
23k views

Moving from bash to zsh

I'm considering moving from bash to zsh as I often come across posts praising zsh. I'm an experienced command line user and I'm assuming the basics are pretty much the same, so I'm looking for advice ...
64
votes
12answers
76k views

How can you log out via the terminal?

Is there a command, that will take you back to the login screen?
61
votes
6answers
41k views

How can I suspend/hibernate from command line?

How can I suspend or hibernate my laptop using command line, without installing additional software?
60
votes
14answers
79k views

How to send mail from the command line?

How to send mail from the command line?
55
votes
4answers
52k views

How can I determine a folder's size from the command line?

Are there any commands that will display the size of the contents of a folder? I can use ls -l to get the size of the files in a folder, or df -h to get the space used on my disks, but neither of ...
53
votes
3answers
5k views

Why is a virtual terminal “virtual”, and what/why/where is the “real” terminal?

I hope the question is self-explanatory. My understanding is that gnome-terminal and konsole are virtual terminals, and they are basically serving the same purpose, i.e. a command line environment ...
51
votes
7answers
121k views

How can I restart x-server from the command line?

How can I restart x-server from the command line? I'd really like to be able to restart my gui without having to do a full system reboot.
50
votes
5answers
37k views

How can I accept Microsoft EULA agreement for ttf-mscorefonts-installer?

After a recent update, ttf-mscorefonts-installer prompted me to accept its license agreement. For some reason my terminal will not allow me to accept, or for some reason I am pressing the wrong ...
45
votes
16answers
3k views

So, what is the advantage of using the terminal? [closed]

I just installed Ubuntu a couple of days ago. As far as I can tell the terminal is a huge part of any Linux distro. My question at this point is why? When I look up anything about it, the commands ...
41
votes
6answers
5k views

What to do when Ctrl-C won't kill running job?

Sometimes, processes ignore the SIGINT signal sent by Ctrl-C in Bash. For instance, man and vi. Assuming you don't want to google or read the manual on how to exit the running process, is there any ...
41
votes
5answers
27k views

Color Meanings in Terminal

What does the different colours in Ubuntu mean? For example, when I type 'ls' in one of my folders, I get one of the files in light green, the other (which is a folder) in blue with green high ...
41
votes
2answers
2k views

How to protect Ubuntu from fork bomb

I heard someone talking about a fork bomb, I did some research and found some dreadful information about some strange looking characters people can have you type at the command line and as a result do ...
40
votes
4answers
20k views

How do I sudo a command in a script without being asked for a password?

I want to turn my system on automatically every day. So I use the below code in my Python script, but sudo asks me for a password every time: os.system('sudo sh -c "echo date \'+%s\' -d \'+ \ ...
40
votes
4answers
13k views

How to really clear the terminal?

I can issue the clear command or press Ctrl + L to clear the current Ubuntu terminal, but this just shifts previous output upwards and if you use mouse scroll or PgUP and PgDown keys it's hard to ...
40
votes
6answers
4k views

What is the difference between ./ and sh to run a script?

I have written a simple script. When I runsh <myscriptname.sh>, i got the correct output, but when I run ./<myscriptname.sh>, I got an error. What is difference between when I do sh and ...
40
votes
3answers
81k views

How to unzip a zip file from the Terminal?

Just downloaded a .zip file from the internet. I want to use the terminal to unzip the file. What is the correct way to do this?
39
votes
4answers
26k views

How to create an empty file from command line

How can I create an empty file from the command line?
39
votes
5answers
3k views

How can I easily share the output of a command or a text file with others?

I recently asked a question on AskUbuntu (or somewhere else), and a comment or answer asks me to paste the contents of some file or the output of a command to troubleshoot my problem. How do I do ...
39
votes
2answers
57k views

What does “cp: omitting directory” mean?

I've issued the following command: sudo cp ~/Transfers/ZendFramework-1.11.4-minimal/library/Zend/* ~/public_html/cmsk.dev/library/ When I do this, I start getting the following messages: cp: ...
37
votes
5answers
20k views

How do I enable full-color support in Terminal?

I have a lovely Vim colorscheme (xoria256) and it looks brilliant in GVim, but when I use normal vim in Terminal, the colorscheme is only partially supported -- for example, the default ...
37
votes
3answers
2k views

What is the terminal command to take a screenshot?

What command(s) can I use in the terminal that's equivalent to the PrtSc (Print Screen) button?
35
votes
5answers
5k views

What is the equivalent of Windows System Properties or Device Manager?

I am new to Ubuntu. In Windows, if I want to know my system properties/configuration, I can see it by going to Control Panel and clicking on the System icon. I can also get a detailed list of the ...
35
votes
8answers
12k views

Is there bittorrent software that runs in a terminal?

I want to deploy it on my vps server, so I can download resource quickly. I want this function a lot, because some resource are in foreign country, so use this could reduce my time.
35
votes
4answers
9k views

Hide current working directory in terminal

As a default, the terminal prompt shows something like: user@system:/folder1/folder2/folder3/folder4$ the deeper you go into the filesystem, the less space is left for typing in commands. Can I ...
32
votes
4answers
2k views

How can I undo the last cd command?

Is there any way to jump back to the previous working directory after doing a cd to a different directory? My use-case is that I'm traversing a directory structure for a Java project, and I'm ...
32
votes
4answers
6k views

What's the difference between 'killall' and 'pkill'?

After using just plain kill <some_pid> on Unix systems for many years, I learned pkill from a younger Linux-savvy co-worker colleague1. I soon accepted the Linux-way, pgrep-ing and pkill-ing ...
31
votes
8answers
1k views

How to become a Terminal Pro

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 ...
31
votes
3answers
8k views

How do I lock the desktop screen via command line?

How can I lock my desktop screen from the command line?
31
votes
2answers
5k views

How do you mute from the command line?

How do you mute the sound system from the command line?
30
votes
6answers
65k views

How to use “grep” command to find text including subdirectories

I want to find all files which contain a specific string of text. The grep command works, but I don't know how to use it for every directory (I can only do it for my current directory). I tried ...
30
votes
6answers
2k views

Is there a difference between the '&&' and ';' symbols in a standard BASH terminal?

They seem to both signal BASH to commence with another command following the symbols but is there a distinct difference?
30
votes
2answers
663 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 ...
29
votes
10answers
10k views

How to clean launch a GUI app via the Terminal (so it doesn't wait for termination)?

Some GUI apps launch cleanly via the Terminal command line. Some don't, and they cause the Terminal to wait for the app to terminate. ...and even then, some don't "release" the command line. The ...
29
votes
4answers
1k 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 ...
29
votes
6answers
9k views

How to create a permanent “alias”?

If you create an alias for example: alias cls="clear" It exists untill you kill terminall session. When you start a new terminal window the alias doesn't exist any more. How to create "permanent" ...
27
votes
6answers
8k views

How can I set default terminal used?

How can I set default terminal used Unity in 11.10? I would like to use ctrl-alt-t default hotkey to start no default terminal. The default terminal is gnome-terminal in 11.10. Where can I change the ...
27
votes
3answers
850 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 ...
27
votes
2answers
3k views

Is there a shell-independent HUD-like menu search tool for GNOME?

The Ubuntu HUD - you love it or you hate it. Personally I rather like a classic desktop, so I use Xfce and Cinnamon, and I don't want to lose my menu in applications. But the HUD is pretty awesome ...
26
votes
16answers
3k views

How do I open a text file in my terminal?

There is a file named RESULTS.txt and I want to open this file in my terminal. (I mean I want to see the file contents be displayed in the terminal and not in some text editor) How do I do that ?
26
votes
6answers
98k views

Change folder permissions and ownership

I would like the user to have full rights on this folder (as well as all sub-directories and files in it): ~/.blabla currently owned by root. I have found numerous posts (in this forum and ...
26
votes
13answers
1k views

Tips for getting to grips with the command line

When I first migrated from Windows to Ubuntu, by far the most daunting thing I had to do was use the command line. Typing commands is an alien experience when you've only ever been used to pointing ...
26
votes
7answers
14k views

Progress and speed with 'cp'?

When copying files using cp, is it possible to display the progress and speed of the transfer? Otherwise, is there any alternative command line utility that can achieve this?
25
votes
8answers
13k views

Torrent client for the command-line?

Yesterday one of my friends asked me, if there is some torrent client, that runs on the command-line. I have no answer for him, but I think that you have it.
25
votes
6answers
4k 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 ...
25
votes
3answers
27k views

How do I download and install Handbrake?

I'm new at Ubuntu so I don't know very well how to use the terminal in order to download and install programs that aren't in the software center. I've tried without success downloading and installing ...
24
votes
7answers
5k views

Making Ctrl+C copy text in gnome-terminal?

Is it possible for me to make Ctrl+C perform a copy command if there is highlighted text in the terminal? Otherwise, it should retain its normal behavior. (If there is a terminal that can do this ...

1 2 3 4 5 65