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

learn more… | top users | synonyms (5)

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 ...
76
votes
20answers
8k 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? ...
73
votes
7answers
249k 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
39k 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?
17
votes
3answers
34k 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 ...
30
votes
5answers
34k views

How to list all variables names and their current values?

Including not only $HOME, $PWD etc but any other you have defined.
14
votes
4answers
28k views

Where to declare environment variables?

What are correct places for: Global environment variables meant to affect all users? User-specific environment variables?
25
votes
2answers
13k 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?
20
votes
4answers
10k views

Can files/directories deleted from terminal be restored?

Is it possible to restore files/directories which are deleted from terminal using rm and rm -r?. If a file is deleted from graphical interface, it could be restored from trash, but how do you restore ...
17
votes
7answers
39k 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 ...
14
votes
3answers
3k 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 ...
32
votes
5answers
7k views

When using sudo with redirection, I get 'permission denied'

When using sudo to allow edits to files, I regularly get 'permission denied'. For example, my mouse is jittery and sluggish, so I want to disable polling: sudo echo "options drm_kms_helper ...
11
votes
5answers
7k views

trim the terminal command prompt working directory

When using the terminal in a deep folder structure sometimes the prompt can take up most of the line. Is there any way in which I can trim the working directory? I know I can do PS1="\W >" to only ...
9
votes
1answer
12k 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 ...
5
votes
1answer
24k 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 ...
13
votes
7answers
11k 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
5k 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
2answers
15k 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
4answers
3k 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.
9
votes
5answers
8k 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 ...
11
votes
3answers
3k views

How to set the Default Browser from the Command Line?

Tried to set the default browser using the GUI tools but this didn't work overall. Is there a way to configure the system wide default browser from command line?
10
votes
4answers
12k 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 ...
9
votes
5answers
18k 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 ...
7
votes
1answer
1k 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 ...
7
votes
3answers
3k views

Can I configure a transparent terminal over my wallpaper?

Can I make a transparent terminal wallpaper on my desktop? I've done this in the past but can't remember what I did.
23
votes
6answers
14k views

How do I change directory to a folder with special characters?

I am using Ubuntu 11.10 and in terminal I want to enter the following folder: cd Milano, Torino (Jan)-Compressed And it does not work! How should I write the command cd to enter this directory?
14
votes
3answers
31k views

What is the difference between 'su -' , 'sudo bash' and 'sudo sh'?

I would like to know what is the difference between su - sudo bash sudo sh I cannot login as root while doing su - because I do not have the root password - I mean I have my user password with ...
12
votes
2answers
24k 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
1answer
5k 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, ...
6
votes
3answers
8k views

Warnings while launching gedit from the Ubuntu terminal

I am facing these warnings while launching gedit from my terminal. Eventually gedit starts, but with these lines of warning every time when I launch gedit: (gedit:3830): Gtk-WARNING **: Theme parsing ...
25
votes
3answers
10k views

Difference between 'dir' and 'ls' terminal commands?

I've been trying to find the difference between using the dir and ls commands in terminal. I know ls is the traditional unix method of viewing the files in a directory, and that dir is the windows ...
7
votes
3answers
8k views

Executing .bat file

I have a setup.bat file which install some applications and i want to execute it. This is content of .bat file : @echo off cls Rip_7z.exe x Rip0.7z cls del Rip0.7z cls Rip_7z.exe x Rip1.7z cls del ...
7
votes
5answers
36k views

Can't execute .out files, getting permission denied

I have written a C++ program and complied it to produce a.out file. However, whenever I try to run it, I get Permission Denied. I read that we can use sudo, but I can't quite get it to work. I use ...
4
votes
1answer
8k views

Why does switching to the tty give me a blank screen?

After booting to the GUI in 12.04, I attempt to move to the virtual terminal (or shell, or tty) via Ctrl-Alt-F1 (F1 - 6), and the screen remains blank. I'm tried all 6 tty instances and the results ...
4
votes
3answers
13k views

How can I add a desktop/GUI to a command-line Ubuntu installation?

I had installed Ubuntu on a VM, with a command-line only interface, now I have had enough of command-line interface experience and plan to proceed with GUI mode. But I dont want to install a fresh ...
2
votes
1answer
551 views

Adding a Wine (.exe) file to open/play files in Thunar's 'Custom Actions'

What is the line parameter in Thunar's "custom actions" that would play a music directory in a Wine (.exe) program? I want to put Foobar2000 (and possibly other such applications) in Thunar's Custom ...
2
votes
1answer
5k views

Run simple bash script to start applications at login

I want to run a simple bash script automatically when I log in. For example #!/bin/bash echo "start spotify" gnome-terminal -e spotify --title spotify When I run this command, one gnome-terminal ...
12
votes
2answers
264 views

What does “$$” mean in the shell?

What does the output of the command below mean? (result is positive integer) echo $$
3
votes
1answer
685 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. ...
3
votes
2answers
4k views

How to install a program ending in “.run” using terminal [duplicate]

I am following How to Install AMD ATI Radeon Graphics HD 6770M on Ubuntu 13.04 64bit but at step no 5. i don't know how to do it 5 - Install Catalyst driver, type the following commands on terminal: ...
3
votes
3answers
1k views

Joining MP3 files losslessly

I have a bunch of MP3 files and I have their paths grouped in a text file. Is it possible to join the relevant MP3 files based on the paths in the text file?
1
vote
1answer
688 views

Why is my terminal invisible after minimizing it and how can I find it?

I minimized my terminal after doing a repo sync. I cant find it on any desktop now! Please help.
161
votes
4answers
137k 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 ...
128
votes
8answers
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 ...
43
votes
3answers
50k 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 ...
42
votes
6answers
9k 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 ...
41
votes
7answers
37k 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 ...
35
votes
4answers
44k views

Find and replace text within a file using commands

How can I replace specific words in a text file using command line?
47
votes
8answers
44k 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.
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?