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

learn more… | top users | synonyms (5)

35
votes
2answers
36k 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?
27
votes
4answers
9k 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.
18
votes
1answer
21k 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 ...
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 ...
10
votes
2answers
3k 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?
10
votes
2answers
26k 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 ...
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 ...
20
votes
5answers
2k 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 ?
14
votes
7answers
14k 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 ...
11
votes
2answers
18k 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 ...
12
votes
1answer
6k 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, ...
12
votes
3answers
10k views

How do I add a repository from behind a proxy?

Hi I've a problem at the office. We're behind a proxy (which is set and applied at ubuntu proxy settings) and when I try to add a repository from terminal, I get: Error reading --some url here--: ...
7
votes
2answers
33k 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 ...
9
votes
2answers
8k 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, ...
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 ...
12
votes
4answers
14k 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, ...
10
votes
2answers
15k 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 ...
10
votes
3answers
15k 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 ...
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 ...
6
votes
1answer
386 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?
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. ...
10
votes
4answers
8k 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.
1
vote
2answers
837 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 ...
10
votes
5answers
12k 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 ...
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
6k 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 ...
84
votes
7answers
296k 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 ...
51
votes
3answers
58k 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 ...
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?
48
votes
5answers
28k 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 ...
44
votes
7answers
40k 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 ...
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?
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.
36
votes
1answer
18k views

What are login and non-login shells?

It is said that settings for non login shell to go into .bashrc file and login shell settings to go into .profile file. What is really meant by login and non-login shells? Please explain without ...
23
votes
3answers
46k 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 ...
21
votes
6answers
7k views

How can I create an alias for cd and ls?

I frequently run the ls command after running the cd command. How can I create an alias (like cs) for this operation?
19
votes
3answers
8k 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?
28
votes
2answers
16k views

How can I tell if my system was booted as EFI/UEFI or BIOS?

How do I determine whether a particular running Ubuntu system was booted using EFI/UEFI, or BIOS?
24
votes
1answer
23k 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 ...
18
votes
7answers
43k views

Create USB installer 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
4answers
21k 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 ...
13
votes
4answers
13k 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.
11
votes
5answers
9k views

Search for duplicate file names within folder hierarchy?

I have a folder called img, this folder has many levels of sub-folders, all of which containing images. I am going to import them into an image server. Normally images (or any files) can have the ...
5
votes
1answer
26k views

Connecting to wireless networks from command line

I need to write a shell script which connects to one of the two available wi-fi connections. One is a un secure connection and the other is secure connection. My question has 2 parts- How to connect ...
14
votes
3answers
417 views

How can I know what programs does some apt-get package contains?

I would like to know what does some specific package install, for example, when installing ncurses, I have found that TAB key expands: sudo apt-get install ncurses- to show: ncurses-base ...
12
votes
2answers
14k 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.
11
votes
2answers
6k views

How can I invoke a user switch from the command line?

In 11.10 I used 'gdmflexiserver -xnest' to switch users without logging out however I think gdm has now been completely removed. I'm trying to bind a keyboard shortcut to do the equivalent of 'Me ...
11
votes
4answers
14k views

How do you change brightness, color and sharpness from command line?

I am controlling my PC with SSH and scripting. How can i change the brightness, color and sharpness from command line? Try 1: failed $ sudo redshift -t 5000:5000 -g .5 Cannot list GNOME panel ...
11
votes
2answers
9k views

Find package name using terminal

Hello I want to remove software (for example transmission) using Terminal. How can i find the package name for the software ?
11
votes
6answers
22k views

How to make Terminal semi-transparent?

I am running Ubuntu 11.04 with gnome 2.3 and I would like my terminal window to be transparent. The problems is the transparent settings in my terminal just shows the desktop background and not the ...