All Questions

Filter by
Sorted by
Tagged with
2585 votes
25 answers

How to list all installed packages

I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system. How would I do this?
Ivan's user avatar
  • 56.4k
2154 votes
9 answers

How to unzip a zip file from the Terminal?

Just downloaded a .zip file from the internet. I want to use the terminal to unzip the file. What is the correct way to do this?
ubuntu-nerd's user avatar
  • 21.8k
1650 votes
28 answers

"The following packages have been kept back:" Why and how do I solve it?

I just added a PPA repository for the development version of the GIMP, but I get this error: $ apt-get update && apt-get upgrade ... The following packages have been kept back: gimp gimp-...
jfoucher's user avatar
  • 23k
1612 votes
27 answers

How can PPAs be removed?

I've added many PPAs using the add-apt-repository command. Is there a simple way to remove these PPAs? I've checked in /etc/apt/sources.list for the appropriate deb lines but they aren't there. This ...
David Ashford's user avatar
1419 votes
12 answers

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.2k
1378 votes
10 answers

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.1k
1294 votes
8 answers

How can I copy the contents of a folder to another folder in a different directory using terminal?

I am trying to copy the contents of a folder to another folder in a different directory using terminal. Would somebody be able to provide me an example of the command line syntax required to achieve ...
pandisvezia's user avatar
  • 13.2k
1169 votes
25 answers

Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

I get this error when trying to use apt-get: E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is ...
La Ode Adam Saputra's user avatar
1165 votes
16 answers

Where is the cron / crontab log?

I want to verify that my cron job is executing and at what time. I believe there is a log for my sudo crontab -e jobs, but where? I searched google and found recommendations to look in /var/log (...
Scott Szretter's user avatar
1141 votes
13 answers

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 ...
David Barry's user avatar
  • 11.5k
1136 votes
5 answers

How can I use Docker without sudo?

On Docker's documentation pages, all example commands are shown without sudo, like this one: docker ps On Ubuntu, the binary is called It also does not work without sudo: sudo ps ...
Flimm's user avatar
  • 41.2k
1115 votes
8 answers

What command do I need to unzip/extract a .tar.gz file?

I received a huge .tar.gz file from a client that contains about 800 mb of image files (when uncompressed.) Our hosting company's ftp is seriously slow, so extracting all the files locally and sending ...
EmmyS's user avatar
  • 15.5k
1104 votes
19 answers

How can I update my nodeJS to the latest version?

I have installed nodeJS on Ubuntu with following code sudo apt-get install nodejs Since I am a new user for ubuntu I also ran this code too sudo apt-get install npm Now when I type nodejs --...
Kanishka Panamaldeniya's user avatar
1059 votes
10 answers

Is there a command to list all users? Also to add, delete, modify users, in the terminal?

I need a command to list all users as well as commands to add, delete and modify users from terminal - any commands that could help in administrating user accounts easily by terminal.
1057 votes
7 answers

How to upgrade a single package using apt-get?

How do I update a single package? As far as man apt-get says apt-get upgrade doesn't take a package/list of packages as parameter: upgrade upgrade is used to install the newest versions of all ...
lurscher's user avatar
  • 11.4k
981 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's user avatar
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 ...
Timur Fayzrakhmanov's user avatar
970 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's user avatar
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 ...
Jorge Castro's user avatar
  • 71.1k
959 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 ...
David B's user avatar
  • 10.9k
954 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 ...
Kit Sunde's user avatar
  • 11k
951 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's user avatar
  • 101k
933 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, ...
NES's user avatar
  • 33k
912 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's user avatar
  • 11.2k
910 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's user avatar
  • 9,203
885 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 ...
user216038's user avatar
  • 8,853
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 ...
Marlin's user avatar
  • 8,854
863 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 ...
Mark Thomas's user avatar
  • 8,745
835 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 ...
James's user avatar
  • 16.8k
834 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 ...
Sparky1's user avatar
  • 12.2k
816 votes
9 answers

How to increment a variable in bash?

I have tried to increment a numeric variable using both var=$var+1 and var=($var+1) without success. The variable is a number, though bash appears to be reading it as a string. Bash version 4.2.45(1)...
user221744's user avatar
  • 8,171
813 votes
22 answers

Command for determining my public IP?

If I check with google, I can see my public IP. Is there something on the Ubuntu command-line which will yield me the same answer?
kfmfe04's user avatar
  • 8,599
806 votes
4 answers

What is the difference between apt and apt-get?

I read about the new fancy progress bar which was added to apt 1.0 in Softpedia and how to enable it here. However on running sudo apt-get update, I did not see the fancy progress bars. On reading the ...
nik90's user avatar
  • 12.5k
798 votes
16 answers

How do I reset a lost administrative password?

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there. I've tried the suggestions on the ...
user avatar
787 votes
7 answers

How do I rename a directory via the command line?

I have got the directory /home/user/oldname and I want to rename it to /home/user/newname. How can I do this in a terminal?
N.N.'s user avatar
  • 18k
780 votes
4 answers

How to delete a non-empty directory in Terminal?

How do I delete the following directory? I typed: rmdir lampp This error comes up: rmdir: failed to remove `lampp': Directory not empty Is there a command to delete all the files in the directory ...
naveen's user avatar
  • 8,027
770 votes
18 answers

How do I find the amount of free space on my hard drive?

Is there a way to quickly check the amount of free / used disk space in Ubuntu? I would assume you could right click on 'file system' in the file browser and choose 'properties' or something but ...
greg's user avatar
  • 10.2k
765 votes
40 answers

How do I remove old kernel versions to clean up the boot menu?

Every time I install a new Linux kernel, it gets left in the grub_config, making the boot menu longer each time. I know I can manually search through the installed packages and remove them. Does ...
756 votes
10 answers

How to run scripts on start up?

How can I run scripts automatically when Ubuntu starts up so I don't have to run them manually after startup?
myusuf3's user avatar
  • 33.8k
756 votes
9 answers

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.1k
752 votes
21 answers

How can I extract a page range / a part of a PDF?

Do you have any idea how to extract a part of a PDF document and save it as PDF? On OS X it is absolutely trivial by using Preview. I tried PDF editor and other programs but to no avail. I would like ...
user72469's user avatar
  • 7,529
750 votes
25 answers

How can I reduce the file size of a scanned PDF file?

I have a 72.9 MB PDF file that I need to shrink to 500 KB or below. The file was a JPEG image that I had scanned and then converted to PDF.
tamimym's user avatar
  • 7,639
745 votes
47 answers

What should I do when Ubuntu freezes?

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when... just one program stops responding? nothing at all responds to mouse clicks or key ...
ændrük's user avatar
  • 76k
736 votes
10 answers

How do I find the package that provides a file?

Simple enough question: is there some shell command (or GUI method) I can use that, given the path to a file on my system, tells me what package put it there? Assuming the file did in fact come from a ...
David Z's user avatar
  • 10.1k
730 votes
9 answers

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,743
729 votes
16 answers

How to check Internet Speed via Terminal?

Instead of going to sites like, I want to check my current Internet speed from the terminal on Ubuntu. How can I do it?
kernel_panic's user avatar
  • 11.6k
728 votes
82 answers

What Application Indicators are available?

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions ...
715 votes
21 answers

How do I get the CPU temperature?

How do I get the CPU temperature?
trampster's user avatar
  • 11.2k
697 votes
9 answers

What does "sudo apt-get update" do?

I am wondering what sudo apt-get update does? What does it update?
Elysium's user avatar
  • 10.9k
696 votes
7 answers

How to make 'python' program command execute Python 3?

The python program command executes Python 2. Python 3 can be executed using the python3 command. How can Python 3 be executed using the python command?
Giri's user avatar
  • 7,103

15 30 50 per page
2 3 4 5