Most Popular
1500 questions
999
votes
14 answers
How to keep processes running after ending ssh session?
Let's say I launch a bunch of processes from a ssh session. Is it possible to terminate the ssh session while keeping those processes running on the remote machine?

Olivier Lalonde
- 58,691
981
votes
12 answers
How do I uncompress a tarball that uses .xz?
I'm used to extracting tarballs with a -xfz flag, which handles gzip and bzip2 archives.
Recently I've run into a .tar.xz file and I would like to uncompress it in one step using tar, how can I do that?

Jorge Castro
- 71,754
979
votes
17 answers
How to add a directory to the PATH?
How do I add a directory to the $PATH in Ubuntu and make the changes permanent?

justingrif
- 11,060
977
votes
15 answers
How to get bash or ssh into a running container in background mode?
I want to ssh or bash into a running docker container. Please, see example:
$ sudo docker run -d webserver
webserver is clean image from ubuntu:14.04
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS …

Timur Fayzrakhmanov
- 24,775
- 10
- 26
- 35
972
votes
7 answers
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 or do I have to change that only after adding it?…

David B
- 11,072
965
votes
20 answers
Error message "sudo: unable to resolve host (none)"
When I run sudo the terminal is stuck for a few seconds and then outputs an error message. My terminal looks like this:
ubuntu@(none):~$ sudo true
sudo: unable to resolve host (none)
What can I do to solve it?

Kit Sunde
- 11,096
960
votes
5 answers
How do I shut down or reboot from a terminal?
How can I shut down or reboot Ubuntu using terminal commands?

Raja G
- 102,391
- 106
- 255
- 328
940
votes
5 answers
How to extract files to another directory using 'tar' command?
I thought tar archive.tar /users/mylocation would work, but it doesn't. How can I do that?

shawnxuc
- 9,503
939
votes
9 answers
How to enable or disable services?
I read about how to enable and disable services in Ubuntu and it seems that there are different possibilities to manage them.
The first method I found is update-rc.d to add new services to startup, which aims on the /etc/init.d folder and its…

NES
- 33,195
928
votes
8 answers
Find and replace text within a file using commands
How can I find and replace specific words in a text file using command line?

Jon Doe
- 11,447
901
votes
9 answers
How can I recursively delete all files of a specific extension in the current directory?
How do I safely delete all files with a specific extension (e.g. .bak) from current directory and all subfolders using one command-line? Simply, I'm afraid to use rm since I used it wrong once and now I need advice.

user216038
- 9,013
878
votes
9 answers
How do I search for available packages from the command-line?
I have successfully installed some packages using the command:
sudo apt-get install packagename
when I have known in advance that those packages are available. But how can I search for or get a list of what is available in the repositories?

Mark Thomas
- 8,895
877
votes
9 answers
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 see the message about updates. How do I install…

Marlin
- 8,924
855
votes
8 answers
How to add existing user to an existing group?
I want to add the Apache user (www-data) to the audio group. I've read the man page for useradd, but I'm not having any luck. I'm running xubuntu 11.10. Here's what I'm doing:
$ sudo useradd -G audio www-data
useradd: user 'www-data' already…

Sparky1
- 12,469
853
votes
22 answers
How do you monitor the progress of dd?
dd is a wonder. It lets you duplicate a hard drive to another, completely zero a hard drive, etc. But once you launch a dd command, there's nothing to tell you of its progress. It just sits there at the cursor until the command finally finishes. So…

James
- 17,106
- 5
- 24
- 38