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

learn more… | top users | synonyms (5)

279
votes
5answers
647k views

How do I install a .deb file via the command line?

How do I install a .deb file via the command line?
276
votes
5answers
777k views

How can I add a new user as sudoer using the command line?

After I add a user using adduser, I can't see it via System->Administration->Users and Groups unless I logout and then login again. Is that normal? Also, can I set a newly added user as a ...
189
votes
4answers
164k views

How do I determine the total size of a directory (folder) from the command line?

Is there a simple command to display the total aggregate size (disk usage) of all files in a directory (folder)? I have tried these, and they don't do what I want: ls -l, which only displays the ...
178
votes
8answers
490k 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?
143
votes
4answers
348k views

How do I restart /shutdown from a terminal?

How to shutdown the Ubuntu installed system and restart it by using terminal ?
142
votes
9answers
133k views

How can I suspend/hibernate from command line?

How can I suspend or hibernate my laptop using command line, without installing additional software?
139
votes
4answers
26k 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 ...
132
votes
9answers
5k 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 ...
120
votes
8answers
287k views

What does “sudo apt-get update” do?

I am wondering what sudo apt-get update does? What does it update?
117
votes
4answers
15k 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 ...
109
votes
12answers
199k views

How can you log out via the terminal?

Is there a command, that will take you back to the login screen?
106
votes
5answers
13k views

How can I tell, from the command line, whether the machine requires a reboot?

When you install certain updates (e.g. a new kernel) in Ubuntu Desktop, you get an indication that a reboot is required (in Lucid, the logout icon turns red). How can I check, from the command line, ...
106
votes
5answers
454k views

How to delete a non-empty directory in Terminal?

How do I delete the following directory? I typed: rmdir lampp This error comes up: rmdir: failed to remove `lampp': Directory not empty Is there a command to delete all the files in the ...
101
votes
10answers
36k 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 ...
96
votes
15answers
208k views

How to send mail from the command line?

How to send mail from the command line?
94
votes
5answers
100k views

What do the different colors mean in the 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 ...
92
votes
7answers
256k 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.
87
votes
7answers
71k 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 ...
84
votes
7answers
295k 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 ...
80
votes
6answers
408k 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 ...
78
votes
20answers
9k views

Are there any games which can train people to learn terminal commands? [closed]

It seems to me learning how to use the terminal is a prerequisite to learning how to use Ubuntu. So I'm trying to figure out the best way to learn. Is there a Quizlet online flash card set out there? ...
76
votes
11answers
77k 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?
75
votes
4answers
330k views

How do I rename a directory via the command line?

I have got the directory /home/user/foo and I want to rename it to /home/user/bar. How can I do this in a terminal?
73
votes
3answers
11k 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 ...
72
votes
5answers
128k views

What is the correct way to completely remove an application?

I've searched the net for such information and found different command lines, like these ones: sudo apt-get remove application sudo apt-get remove application* sudo apt-get remove --purge ...
69
votes
9answers
6k views

Run same command again but as root

Sometimes when I run a command I don't notice that I needed to run it as super user to have enough permission. Is there a way to run the same command again but as a super user?
69
votes
9answers
11k views

What is the difference between Terminal, Console, Shell, and Command Line?

What is the difference between Terminal, Console, Shell, and Command Line?
67
votes
14answers
88k views

How to check battery status using terminal?

I would like a command that check the battery status through the terminal
65
votes
4answers
178k views

How can I copy the contents of a folder to another folder in a different directory using terminal?

I am trying to copy the contents of a folder to another folder in a different directory using terminal. Would somebody be able to provide me an example of the command line syntax required to achieve ...
65
votes
5answers
51k views

How do I enable full-color support in Vim?

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 ...
64
votes
6answers
136k views

A command to list all users? And how to add, delete, modify users?

I need a command to list all users in terminal. And how to add, delete, modify users from terminal. That could help in administrating your accounts easily by terminal.
64
votes
4answers
52k views

How can I get octal file permissions from command line?

There is a chmod command to set file permissions, but can I get file permissions in octal mode (such as 755) from the command line?
62
votes
6answers
128k views

How do I find the kernel version, Ubuntu release and disk partition information from the terminal?

Which commands will give me information about following? Kernel Version Distribution version no. All partition size of the HDD in Terminal
62
votes
6answers
52k views

How can I recursively delete all files of a specific extension in the current directory?

How do I safely delete all files with a specific extension (e.g. .bak) from current directory and all subfolders using one command-line? Simply, I'm afraid to use rm since I used it wrong once and now ...
61
votes
23answers
14k views

Any command line calculator for Ubuntu?

I am looking for a Calculator which can do calculations in the terminal itself without any other extra prefixes and suffixes. For example: If I typed something like 10000-9000 in the terminal, the ...
61
votes
7answers
137k views

How to check Internet Speed via Terminal?

Instead of going to sites like speedtest.net, or others, I want to check my current internet speed from the terminal on 11.10. How can I do it?
61
votes
1answer
36k views

Differences between /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin [duplicate]

I'm running an Ubuntu Server 13.04, but I see the same on a 12.04: I have six directories with command files. These are: /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin What are the ...
59
votes
11answers
32k views

How can I set default terminal used in Unity?

How can I set the default terminal used in Unity? I would like to use the Ctrl+Alt+T hotkey to start a non-default terminal. The default terminal is gnome-terminal. Where can I change the default ...
59
votes
6answers
158k views

How can I create a zip archive of a whole directory via terminal without hidden files?

I have a project with lots of hidden folders / files in it. I want to create a zip-archive of it, but in the archive shouldn't be any hidden folders / files. If files in a hidden folder are not ...
58
votes
3answers
59k views

What is the command to run System Settings from a terminal?

System Settings can be run from the launcher (pinned by default), the Dash, or the power cog. But what command would I enter in a terminal window if I want to run it from there?
57
votes
4answers
127k views

How to create an empty file from command line

How can I create an empty file from the command line?
56
votes
10answers
15k views

Why do I need to type `./` before executing a program in the current directory?

While executing a C program, a.out, using the Ubuntu terminal, why do I always need to type ./ before a.out, instead of just writing a.out? Is there solution for this?
55
votes
5answers
46k 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" ...
54
votes
6answers
129k views

How to open a PDF file from terminal?

I used to work on the Mac terminal before and I used: open file2open.pdf and the PDF file would be opened on preview or whatever my default viewer was. When I use it in the terminal in Ubuntu I ...
53
votes
6answers
69k views

How do you select the fastest mirror from the command line?

I want to update my sources.list file with the fastest server from the command line in a fresh Ubuntu Server install. I know this is trivially easy with the GUI, but there doesn't seem to be a simple ...
53
votes
8answers
50k 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.
52
votes
8answers
40k 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.
52
votes
4answers
61k views

Find and replace text within a file using commands

How can I find and replace specific words in a text file using command line?
51
votes
16answers
9k 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 ...
51
votes
7answers
293k views

How to install Chrome browser properly via command line?

I am trying to install chrome browser via command line. I tried this: $ apt-cache search chrome browser The results show that the proper term is "chrome-browser," so I tried that: $ sudo apt-get ...