Skip to main content

Questions tagged [command-line]

This tag is for questions that are about using the command-line interface (CLI), including the use of standard command-line tools and shell commands. However, for questions that are specific to each shell (like Bash, ZSH etc.), use the tag of that particular shell as well.

Filter by
Sorted by
Tagged with
1468 votes
12 answers
4.5m views

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

How do I install a .deb file via the command line?
TheXed's user avatar
  • 26.8k
40 votes
8 answers
68k views

Nothing shows up in the terminal when I type my password

When I'm about to install a program in the terminal it wants the password: [sudo] password for xxx: But when I start to type my password nothing happens. What should I do?
Lazloinn's user avatar
  • 401
81 votes
5 answers
377k views

What is a terminal and how do I open and use it?

What is a terminal? How do I open a terminal window? How do I use the terminal?
202 votes
7 answers
305k views

How to solve "permission denied" when using sudo with redirection in Bash?

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 poll=N"&...
Jack's user avatar
  • 3,929
73 votes
10 answers
120k views

How to run scripts without typing the full path?

I'd like to know if there is a way to run program/shell script without typing full path: /opt/idea/bin/idea.sh
Poorman_Patrick's user avatar
750 votes
9 answers
2.0m 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 ...
user48949's user avatar
  • 7,943
184 votes
10 answers
442k views

Running programs in the background from terminal

How do I run a program in the background of a shell, with the ability to close the shell while leaving the program running? Lets say my UI is having problems or for some reason, I need to boot up a ...
OVERTONE's user avatar
  • 2,317
704 votes
9 answers
2.1m views

What does "sudo apt-get update" do?

I am wondering what sudo apt-get update does? What does it update?
Elysium's user avatar
  • 11k
539 votes
13 answers
1.1m views

Execute sudo without Password?

Inspired by this question.... I am the sole person using my system with 12.04. Every time I issue a sudo command; the system asks for the user password (which is good in its own way). However I was ...
BhaveshDiwan's user avatar
  • 11.1k
53 votes
8 answers
147k views

How do I enter a file or directory with special characters in its name?

I want to enter the following folder in the terminal: Milano, Torino (Jan)-Compressed How should I write the command cd to enter this directory? Spaces and several other special characters like \, *...
Pomario's user avatar
  • 2,038
507 votes
17 answers
4.4m views

How do I run .sh scripts?

Whenever I open a .sh file, it opens it in gedit instead of the terminal. I can't find any option similar to Right Click → Open With → Other Application... → Terminal. How do I open this file in the ...
Alex's user avatar
  • 5,071
979 votes
7 answers
3.4m views

How can I add a user as a new 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 log out and then log in again. Is that normal? Also, can I set a newly added user as a sudoer ...
David B's user avatar
  • 11.1k
37 votes
9 answers
16k views

How can I get help on terminal commands?

I often see things like read man xyz For more information read xyz's man page. see info xyz so I wonder: How can I get help on terminal commands generally? What exactly are these man and ...
dessert's user avatar
  • 40.2k
217 votes
18 answers
398k views

How to change LCD brightness from command line (or via script)?

To work around bug #1005495 (changing LCD brightness via hotkeys impossible), I'd like to have one command line query for increasing and one for reducing the brightness of my LCD. I could then map a ...
user69748's user avatar
  • 2,383
769 votes
9 answers
3.8m 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 ...
user2413's user avatar
  • 14.5k
502 votes
8 answers
1.6m views

How to create a bootable Ubuntu USB flash drive from terminal?

Is there any way to create a bootable Ubuntu USB flash drive from the terminal without using any third-party applications like YUMI, Unetbootin, Startup Disk Creator, etc. I tried to create a ...
59 votes
7 answers
14k views

How can I easily share the output of a command or a text file with others?

I recently asked a question on Ask Ubuntu (or somewhere else), and a comment or answer asks me to paste the contents of some file or the output of a command to troubleshoot my problem. How do I do ...
ish's user avatar
  • 140k
53 votes
2 answers
62k views

How do file permissions work?

Can you explain briefly the main concepts and command line tools used to manage file permissions?
guillermooo's user avatar
118 votes
8 answers
177k views

How do I easily rename multiple 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 ...
Jiew Meng's user avatar
  • 10.4k
22 votes
2 answers
73k views

Restore default apt repositories in sources.list from command line

I am looking for the best method to restore /etc/apt/sources.list to default from the command line. Is there no way to reference the source code of the package which generates this file or something ...
Ryan Burnette's user avatar
600 votes
20 answers
1.2m views

How do I fix my locale issue?

I am getting this message every time I do something like starting or stopping a service. perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: ...
HackToHell's user avatar
  • 6,776
53 votes
5 answers
289k views

Install Nvidia driver instead of nouveau

I've installed Ubuntu 14.04 and I'm experiencing a fuzzy/blurry screen and bad support for multiple screens. I realized that Ubuntu installs nouveau as default, but I need to install nvidia drivers, ...
Dor Zohar's user avatar
  • 631
22 votes
4 answers
86k 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 ...
Udhaya Kumar's user avatar
10 votes
2 answers
12k views

Switching between virtual console (tty) and GUI

How to switch between virtual console and GUI in Ubuntu? I wanted to see what key functions would allow me to switch between the two.
Kevin Taylor's user avatar
491 votes
5 answers
1.1m views

What do the different colors mean in ls?

What do the different colours in Ubuntu's ls command mean? For example, when I type the ls command in one of my folders, I get one of the files in light green, the other (which is a folder) in blue ...
Rafid's user avatar
  • 5,447
254 votes
5 answers
573k views

How to create a permanent "alias"? [duplicate]

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" ...
Zango's user avatar
  • 5,041
1399 votes
11 answers
4.0m 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.
led-Zepp's user avatar
  • 14.3k
15 votes
3 answers
161k views

How do I cd into a directory in the home folder?

How do I change directories to downloads, from the home folder, in the latest version Ubuntu 12.10? I tried cd /downloads, but it gave an error saying that there is no such directory.
sam's user avatar
  • 159
149 votes
4 answers
450k views

How do I change mirrors in Ubuntu Server from regional to main?

I have a Lucid Server (10.04) set up and I would like to change the mirror from US (or any other country) to the Main Ubuntu Mirror. For example my two first entries in sources.list are: deb http://...
Sorin-Mihai Oprea's user avatar
69 votes
4 answers
147k views

Where to declare environment variables?

What are correct places for: Global environment variables meant to affect all users? User-specific environment variables?
Ivan's user avatar
  • 57.5k
237 votes
6 answers
275k views

How can I shorten my command line (bash) prompt?

Currently it is: michael@Castle2012-Ubuntu-laptop01:~/Dropnot/webs/rails_v3/linker/spec/controllers$ Outside of renaming my machine and directory structure... How could I make it be something more ...
Michael Durrant's user avatar
106 votes
5 answers
329k views

What is a tty, and how do I access a tty?

I keep hearing about these things known as tty's. what are they how can I access them what do they do?
jrg's user avatar
  • 60.9k
30 votes
3 answers
124k views

How do I enable the "Universe" repository from the command line? [duplicate]

How do you use terminal to enable Universe source? Or any those 4 from Software Sources: Main, Universe, Restricted, Multiverse Main is on by default and Restricted is on if durring Ubuntu ...
Kangarooo's user avatar
  • 5,085
233 votes
17 answers
294k views

How to change Gnome-Terminal title?

I have several instances of terminals running in my working environment, what I would like is to set a specific title for each one, in order to have a clear idea what purpose the specific terminal ...
topless's user avatar
  • 7,405
205 votes
7 answers
1.8m 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 ...
user avatar
149 votes
4 answers
130k views

What do the various dpkg flags like 'ii' 'rc' mean?

I frequently need to check which packages are installed, and I use the following command: dpkg -l | grep foo which gives the following output Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/...
theTuxRacer's user avatar
  • 16.3k
148 votes
3 answers
815k views

How do I create a script file for terminal commands?

In Windows I can write a file containing commands for cmd (usually .cmd or .bat files). When I click on those files it will open cmd.exe and run them commands the file contains. How would I do this ...
Seth's user avatar
  • 58.3k
83 votes
8 answers
83k views

How to find out the terminal command of an application?

I want to use some applications shown on the Unity Launcher in a terminal, but I need to know the appropriate command to run them. How can I achieve that?
Sony Santos's user avatar
498 votes
14 answers
726k views

How can I suspend/hibernate from command line?

How can I suspend or hibernate my laptop using command line, without installing additional software?
user1034's user avatar
  • 4,983
180 votes
14 answers
291k 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 ...
Evan's user avatar
  • 3,725
63 votes
5 answers
557k views

How to edit files in a terminal with nano?

Sometimes, a graphical text editor like gedit or kate cannot be used (because you're in a virtual console for example). Luckily, there are text editors for the terminal. An easy one is nano, but I ...
Lekensteyn's user avatar
  • 175k
582 votes
3 answers
1.6m views

How do I use variables in a sed command?

I tried the following code to replace QQ with ZZ, but it doesn't do what I want: var1=QQ sed -i 's/$var1/ZZ/g' $file However, this code does what I want: sed -i 's/QQ/ZZ/g' $file How do I use ...
UAdapter's user avatar
  • 17.7k
449 votes
4 answers
1.9m views

How to make a file (e.g. a .sh script) executable, so it can be run from a terminal

I have a script.sh file and type of this file is shellscript file. I want to make this file as application/x-executable file. How can I make it?
Ziyaddin Sadygly's user avatar
883 votes
9 answers
2.7m views

How to install updates via command line?

When I log into my web server via SSH I see the information: 88 packages can be updated. 80 updates are security updates I tried apt-get update then apt-get upgrade but each time I log in I still ...
Marlin's user avatar
  • 8,984
243 votes
20 answers
359k views

Running a .desktop file in the terminal

From what I can gather, .desktop files are shortcuts that allow application's settings to be customized. For instance, I have lots of them in my /usr/share/applications/ folder. If I open that ...
Malabarba's user avatar
  • 10.3k
158 votes
14 answers
478k views

Mount encrypted volumes from command line?

If I have an encrypted external disk (or an internal disk that is not in fstab), I see an entry for it in Nautilus -- with an entry like "X GB Encrypted Volume". I can click on this volume, and am ...
cha's user avatar
  • 2,083
63 votes
7 answers
140k views

Why am I getting "Authentication failure" when running the "su" command?

I am having problems with the su command. I know my password and I am typing it correctly, but su indicates Authentication failure. So I checked on the internet and then went into recovery mode and ...
user12895's user avatar
  • 785
77 votes
11 answers
76k views

How to set custom keyboard shortcuts from terminal?

How to set custom keyboard shortcuts from terminal for different Linux versions? Basically I want to know where Linux stores the keyboard shortcut files and how it can be edited. On my research I ...
Anonymous Platypus's user avatar
455 votes
19 answers
699k views

How do I check the battery's status via the terminal?

I would like a command that displays the battery status in the terminal.
Joe's user avatar
  • 4,551
141 votes
5 answers
418k views

How to connect and disconnect to a network manually in terminal?

Since the network manager is troubling me so much I want to replace it (possibly wicd orNM from ppa:volanin). I do not know how to connect and disconnect to the network through the terminal without ...
user7048's user avatar
  • 1,411

1
2 3 4 5
71