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

learn more… | top users | synonyms (5)

14
votes
3answers
4k 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 ...
11
votes
2answers
20k views

Environment variables when run with 'sudo'

As example to my question, my ~/.bashrc file contains this lines: > export LD_LIBRARY_PATH=/opt/intel/mkl/lib/ia32:$LD_LIBRARY_PATH > export LD_PRELOAD=/opt/intel/mkl/lib/ia32/libmkl_core.so ...
10
votes
2answers
30k 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 ...
16
votes
4answers
7k 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
2answers
17k views

How do I log all input and output in a terminal session?

How do I keep logs of all the work done via terminal? For example, I want a record of all the work done on database via terminal.
12
votes
5answers
6k 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 ...
11
votes
3answers
17k 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 ...
4
votes
2answers
7k 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 ...
23
votes
2answers
4k 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
3answers
10k 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 ...
134
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 ...
103
votes
15answers
232k views

How to send mail from the command line?

How to send mail from the command line?
80
votes
20answers
10k 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? ...
22
votes
10answers
16k 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.?
34
votes
5answers
43k 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.
24
votes
1answer
272k views

How to copy files via terminal?

I have read about copying files with terminal but these examples will help me a lot. So here is what I want to do: Examples: I have a file in /home/levan/kdenlive untitelds.mpg and I want to copy ...
20
votes
3answers
10k 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?
39
votes
2answers
44k 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?
26
votes
2answers
1k 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 ?
29
votes
2answers
239k 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 ...
23
votes
1answer
29k 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 ...
18
votes
7answers
48k views

Create USB installer to install Ubuntu from the command line?

I'm trying to create a bootable USB image to install Ubuntu on a new computer. I have done this before following the "create USB drive" instructions for Ubuntu desktop, but I don't have an Ubuntu ...
21
votes
5answers
3k views

How to both display a command line's output on console and save the output into a text file?

How can I run sudo apt-get install by BOTH seeing the process of installation (long in my case) and saving its output into a text file ?
20
votes
2answers
11k views

How can I hibernate/suspend from the command line and do so at a specific time

I managed to find out how to suspend/hibernate the system from the command line by reading How can I suspend/hibernate from command line?. However, I would like to know how to use the command line to ...
12
votes
2answers
4k views

How to access gvfs mounts from command line?

I have some samba share mounted via Nautilus and I'd like to access the files from command line. They used to appear under $HOME/.gvfs but not any more. Where have they gone to?
24
votes
8answers
2k views

How to make a package manager wait if another instance of APT is running?

I have seen many softwares such as Update Manager and Synaptic Package Manager, they wait if some other program is using the /var/lib/dpkg/lock and is locked. How can we do this through the Terminal? ...
22
votes
4answers
7k views

How can I list all packages I've installed from a particular PPA?

How can I list all packages I've installed from a particular PPA? Command-line answers preferred. Related question: how can I list all installed packages that are not available from the main Ubuntu ...
14
votes
7answers
16k 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 ...
13
votes
2answers
10k views

How can I create a custom terminal command (to run a script)?

I'm a web developer. When I want to start working, always i'm executing some command on terminal. For example: sudo service apache2 start sudo service mysql start sublime For speed up this process, ...
12
votes
1answer
8k 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, ...
7
votes
2answers
39k views

How to connect to Wired internet connection through terminal?

I am using Ubuntu 10.04 with KDE on it. I am facing a problem in connecting to wired LAN internet connection. Can any one tell me the procedure on how to connect to wired LAN internet connection ...
14
votes
6answers
20k views

Home directory not being created

I am trying to understand system administration on Ubuntu. So, as an example, I create a dummy user using sudo useradd -d /home/linda linda and the passwd to create a the password. I check that an ...
8
votes
7answers
4k views

how to shift applications from workspace 1 to 2 using command

Is there any way I can switch the application running in one workspace to another on command line? I use Ubuntu 10.04 UPDATE1 As per suggestions below wmctrl -l 0x02200003 -1 bond Bottom ...
7
votes
1answer
502 views

How can I run a command and copy its output?

I've been asked to run a command and copy and paste the output but I have no idea where to start. What do I do?
12
votes
4answers
16k views

Opening a file from terminal

When we want to open an application or file from the terminal, we type, say, okular file.dvi This opens the application, but also shows the status of the application. We cannot close the terminal, ...
11
votes
3answers
18k views

“No such file or directory” when invoking java

I'm trying to re-install Oracle JDK 7 32 bit to 64 bit Ubuntu (previously 64 bit JDK was installed). JDK is currently present at /usr/lib/jvm/jdk1.7.0. I invoke sudo update-alternatives --remove ...
8
votes
2answers
11k views

Install restricted drivers in command line

I'm aware there's already been a question and answer regarding Nvidia drivers, but my case is a little different. My wireless adapter's driver is proprietary, and for a minimal install, I need a ...
20
votes
3answers
3k views

Where can I find the command line?

A basic question: Where do I find the command line? There is a lot of information about commands and using the command line, but I'm an absolutely new Ubuntu user: I can't find find the command line. ...
13
votes
5answers
16k views

How do I insert a line at the top of a text file using the command line?

I want to insert text at the top of an already existing file. How can I achieve this. I tried echo and tee but was not successful. I was trying to insert repo line at the top of sources.list file ...
11
votes
4answers
10k views

How do I get the version of an application from the command line?

I would like to know how to get the version information of an installed program that doesn't have the --version or -version method implemented.
5
votes
2answers
606 views

Generate a list of available commands and what each does

Does a Linux command set with descriptions exist on the net? I have a list of commands i obtained by using alt! with 1947 commands listed. I put these into a file but I am having to write what each ...
1
vote
3answers
223 views

List Installed Applications Grouped By Type

I want a list of the applications installed in my system, however, I only want the ones listed as per the start menu. I am not interested in a list of packages / dependencies etc so the following is ...
5
votes
1answer
3k views

Why do df and du show different output?

When I execute the command df -h /tmp it says disk utilization is 100%, but when it try du -sh /tmp it says disk utilization is 2%. I want to know why these commands shows different output, how these ...
2
votes
1answer
5k views

Remove titlebar from maximized terminal window

I'm using XFCE on 10.10 and this is just one of those "is this even possible" type questions. When I have the terminal maximized, is it possible to remove the titlebar, including the close, minimize ...
2
votes
5answers
7k views

How to batch rename files with “variables”? [duplicate]

I use xmbc to view my tv shows. Before I began using xmbc, I batch downloaded the first few seasons of "Bleach". What can I say, I'm an anime fan ;-). These are named: "bleachxx.mp4" where xx is the ...
97
votes
9answers
338k 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 ...
68
votes
1answer
45k 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 ...
100
votes
4answers
422k 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
4answers
64k 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?
47
votes
7answers
44k views

How to easily rename files using command line?

One of the ways I quickly rename files in Windows is F2 > Rename > Tab (to next file) > Rename ... But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must ...