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

learn more… | top users | synonyms (6)

29
votes
3answers
275k views

How to start GUI from command line?

I've installed the following version of ubuntu om my machine. ubuntu-12.04-desktop-i386.iso But when I switch on the computer, I get command line. Ubuntu 12.04 LTS COMP-1245 tty1 Once I ...
28
votes
2answers
24k 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
290k 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 ...
11
votes
2answers
36k views

Bluetooth from the command line in 12.04?

I've been trying to pair up my bluetooth keyboard with my computer after reinstalling from a standard ubuntu 12.04 to a minimal install. In the minimal install I have no gui, so I've been trying to ...
15
votes
0answers
12k views

Command to know my external IP address? [duplicate]

How can I get my external IP address using the Command Line?
13
votes
1answer
10k views

What commands are needed to install Ubuntu Core?

Ubuntu Core's wiki page page contains the instructions to install Ubuntu Core on a target media: Uncompress (do not unpack) rootfs Format target media: at least one partition should be ext2, ...
14
votes
2answers
37k views

How do I switch from LightDM to GDM?

How do I switch from the default display manager (Lightdm) to the older display manager (GDM)?
11
votes
2answers
2k views

How to run a command or script at screen lock/unlock?

I am looking for a way to store lock/unlock screen times. A=$(date) echo $A >> $HOME/time_xprofile What did I try: $HOME/.bashrc $HOME/.bash_logout $HOME/.bash_prompt $HOME/.xprofile Then ...
6
votes
1answer
36k views

How to make a file executable? [duplicate]

How can I make my file so that I can double click on it, and it runs. It is a .sh script, but I also have files that say: executable (application/x-executable) in the description of what they are. ...
6
votes
1answer
2k views

Why is pkexec preferred over gksudo for graphical applications?

Please provide Ubuntu documentation that refutes this: https://help.ubuntu.com/community/RootSudo Why, on my fully updated 13.04 system, does pkexec not function? $ pkexec gedit somefile.txt No ...
1
vote
2answers
208 views

How to run xrandr commands at startup in Ubuntu

How can I run the following xrandrcommand on startup? xrandr cvt 1368 768 xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync xrandr --addmode VGA1 ...
65
votes
4answers
81k views

How can I get a list of all repositories and PPAs from the command line?

I know how to list all packages installed on my system. But how could I get a list of all repositories and PPA's? I know I can look into /etc/apt/sources.list and /etc/apt/sources.list.d, but I'm ...
84
votes
4answers
113k 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?
75
votes
5answers
105k views

How to list all variables names and their current values?

Including not only $HOME, $PWD etc but any other you have defined.
42
votes
2answers
87k views

How to download an MP3 track from a YouTube video [duplicate]

Possible Duplicate: How to download a youtube video via terminal There are several Q&A threads that explain how to download youtube videos using the terminal. However, I would also ...
32
votes
4answers
68k views

How do I save terminal output to a file?

How do I save the output of a command to a file? Is there a way without using any software? I would like to know how.
47
votes
6answers
62k views

How to add Android Studio to the launcher?

I'm trying to install the android studio so that I can launch it from a launcher instead of via terminal. Can someone give specific instructions please? I think this is something to do with the ...
28
votes
2answers
2k 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 ?
24
votes
1answer
8k 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) ...
30
votes
5answers
12k 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.
17
votes
7answers
19k views

How can I start gnome-terminal at a particular directory?

I've tried gnome-terminal -x 'cd /path/to/dir' and gnome-terminal -e 'cd /path/to/dir' but both give me errors when the new terminal opens. How do I get a new terminal to start in a specific ...
15
votes
3answers
5k views

How to turn off the display via the command line?

Is there a way to turn off the display (enter power saving mode) using a command? For example, when the computer is inactive for a specific interval, the screen turns off to conserve energy. Is there ...
13
votes
6answers
7k views

Why are letters overlapping in the terminal?

I installed Oneiric as a guest OS in VirtualBox using the Mini CD. I installed the ubuntu-desktop package and everything seems to work fine - well, except for a font issue with the terminal: As you ...
9
votes
2answers
37k views

Terminal method of formatting storage drive

I want to know how to format a storage drive from the terminal. Helpful things to provide in the answer would be often used options for commands and base knowledge that one can use to extrapolate ...
16
votes
4answers
10k views

Why is moving directories to /dev/null dangerous?

When trying to move a test_dir directory to /dev/null, I get the message mv: cannot overwrite non-directory ‘/dev/null’ with directory ‘test_dir/’ Then why do people say "Don't run the command sudo ...
12
votes
3answers
24k views

How do I resize partitions using command line without using a GUI on a server?

I only access the server via terminal and I can't use graphical tools such as gparted! I need it because I want to create a new partition from a part of root about 768mb to create a swap partition. # ...
7
votes
1answer
2k views

How to make a directory with permanent permissions different from default

I have system-wide default permissions set with umask 027. I am in the need to make a directory whose sub-directories would need 775 permission and whose files would need 664 permissions and make ...
11
votes
3answers
20k views

How do I make the terminal run python 3.1?

Currently, when I type "python" at the terminal I get v2.6 which is all fine and dandy but how can I set it to use v3.1 instead? Is there a "path" variable out there somewhere that I can change like ...
23
votes
2answers
5k views

What does `~/ ` mean?

I'm new to Linux and Ubuntu. People keep using ~/filename in their answers to my questions. What does ~/ mean?
5
votes
1answer
3k views

Ubuntu Touch using apt-get

I'm sorry if this has already been asked, I did do some searching and didn't find it. However a number of questions, I have just installed the latest Ubuntu touch, on a nexus 5, and was going to have ...
5
votes
3answers
16k views

Create a .desktop file that opens and execute a command in a terminal

I would like to know how to write the Exec command of a .desktop file to open a new terminal and execute a shell script in it. The shell script is working and accessible by all users. When launching ...
8
votes
2answers
435 views

What does // mean in a path?

I was working in my terminal, when I misspelled while cd to root (/). Accidentally, I typed // and I got in terminal: root@weblocalhost://# When i type pwd, i get response // but when I type ls -s ...
1
vote
2answers
211 views

How to switch to a command-line console [duplicate]

I have just upgraded my system but it boots to Low Graphics mode by default. I have seen questions on how to solve this problem and they all suggest to run a couple of commands from a command-line ...
188
votes
5answers
927k 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 ...
140
votes
9answers
6k 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 ...
83
votes
20answers
12k 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? ...
141
votes
4answers
588k 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?
131
votes
9answers
119k 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 ...
45
votes
6answers
15k 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 ...
67
votes
8answers
71k 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.
53
votes
6answers
113k views

Browsing the internet from the command line

How can I browse the Internet from the command line in Ubuntu?
72
votes
5answers
84k views

How can I empty the trash using terminal?

I am not able to search trash anywhere. Can you please tell me a command or anything like that to empty the trash using terminal ?
26
votes
12answers
20k 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.?
21
votes
4answers
14k views

How to show ascii art at the top of the terminal when it's opened?

As you can see on this screeshot of Mik's Guake he have a statup message of ascii art when he opens it, and that's what I'd like to do, can someone help me?
37
votes
5answers
49k views

Browse internet inside terminal

Is there any other package other than elinks so that I browse internet inside the terminal using terminal as a browser. I feel elinks is a bit difficult to operate.
52
votes
2answers
59k views

How to get disk usage from command line?

How can I get the current disk usage (in %) of my hard drive from the command line?
38
votes
1answer
97k views

Command to append line to a text file without opening an editor

Assuming i have a line that i want to add to a file without opening an editor. How could i append this line alias list='ls -cl --group-directories-first' to this file config.fish
33
votes
1answer
43k views

What do the STAT column values in ps mean?

In the STAT column of ps there are a load of letters that don't really make much sense. What do they mean? Here's an example of ps aux | head: USER PID %CPU %MEM VSZ RSS TTY STAT ...
23
votes
3answers
3k views

Where should I put my script so that I can run it by a direct command?

Where can (should) I put my (bash) script so that it can be used (forever) by terminal or by a direct command: Alt+F2? I know there is /usr/bin and /sbin & /bindirectories but when should I use ...
16
votes
1answer
2k views

How to display random jokes from www.icndb.com in your terminal?

I already know that you can get some nice quotes/jokes using the fortune program. But I've found in this urwird script a new source of fun that I'd like to have when I open a new terminal. This time ...