Most Popular
1500 questions
976
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
970
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
- 57,431
- 62
- 125
- 146
964
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
- 70,934
- 124
- 466
- 653
959
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
- 10,850
- 5
- 21
- 19
955
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
- 10,892
- 6
- 25
- 18
951
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
- 10,956
- 7
- 25
- 32
950
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
- 100,643
- 105
- 254
- 328
931
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
- 32,845
- 41
- 101
- 115
905
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,127
- 6
- 22
- 12
904
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,143
- 3
- 15
- 4
873
votes
8 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
- 8,733
- 3
- 12
- 4
870
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,854
- 3
- 14
- 5
855
votes
9 answers
How do I search for available packages from the command-line?
I have successfully installed some packages using the command line '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,665
- 4
- 15
- 9
830
votes
21 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
- 16,746
- 5
- 23
- 37
829
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,109
- 8
- 20
- 14