Greatest Hits

1174 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
2207 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
  • 22.3k
1399 votes
11 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.3k
600 votes
7 answers

How to install Google Chrome

How do you install Google Chrome on Ubuntu?
user314763's user avatar
  • 6,017
691 votes
14 answers

How do I install a .tar.gz (or .tar.bz2) file?

I have downloaded tar.gz files. But I don't know how to install it. How do I install this kind of file?
Silambarasan's user avatar
  • 7,975
1118 votes
20 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
2650 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
  • 57.5k
507 votes
17 answers

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
1328 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.5k
788 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,107
810 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
1466 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.7k
248 votes
13 answers

Uninstall GRUB and use Windows bootloader

I have Windows 8 pre-installed, and then I installed GRUB with Ubuntu. Ubuntu is not my thing, so now I want to remove it along with GRUB. From what I have learned, with UEFI, GRUB does not overwrite ...
mrolive's user avatar
  • 2,635
883 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,984
1088 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.
1172 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
  • 16.2k
387 votes
7 answers

fsck error on boot: /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

I dual boot Ubuntu and Windows 7. I was browsing on FireFox in Ubuntu and all of a sudden I get some error message, so I rebooted. Now when I try to boot into Ubuntu I get this message: fsck from ...
Jordy's user avatar
  • 3,971
365 votes
7 answers

"Unable to locate package" while trying to install packages with APT

When I try to install any package through the command line, I get an error. $ sudo apt-get install <package> Reading package lists... Done Building dependency tree Reading state ...
CodeGeeky's user avatar
  • 3,773
1722 votes
29 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
  • 23.8k
769 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.5k
574 votes
52 answers

Ubuntu gets stuck in a login loop

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back. I've read that the problem might be caused by ...
Calvin Wahlers's user avatar
966 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
  • 103k
215 votes
3 answers

System has not been booted with systemd as init system (PID 1). Can't operate

I use WSL2 on Windows 11. I want to run the systemctl command in Ubuntu 20.04, but it gives me the following error: System has not been booted with systemd as init system (PID 1). Can't operate. ...
David SHainidze's user avatar
805 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
  • 18.3k
977 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
  • 11.1k
359 votes
7 answers

Boot drops to a (initramfs) prompts/busybox

I am running an HP pavilion dv6000 dual boot win7 and Ubuntu 12.04. (well, up until today). After a reboot, the boot process drops to the BusyBox shell and I end up at the prompt: BusyBox v1.18.5 (...
dpm's user avatar
  • 3,591
978 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
405 votes
43 answers

Installing Broadcom Wireless Drivers

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible. What are the steps to install Broadcom wireless drivers ...
1187 votes
17 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 Sz's user avatar
  • 12.1k
205 votes
7 answers

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
1158 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
  • 42.4k
1006 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
1173 votes
14 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.8k
932 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.5k
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 ...
Kit Sunde's user avatar
  • 11.1k
987 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
  • 72.2k
217 votes
18 answers

How to remove Ubuntu and put Windows back on?

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows. How do I remove Ubuntu and reinstall Windows? Editor's note: many of the ...
482 votes
13 answers

How do I install Sublime Text 2/3?

I installed Sublime Text 2 on 12.04 as per this tutorial. However I don't have adequate permissions when launching the program from the Unity launcher. For example I cannot install packages, or if I ...
Michael Gruber's user avatar
578 votes
13 answers

How do I install Guest Additions in a VirtualBox VM?

I've recently installed Ubuntu on Oracle's Virtualbox. Now I want to install the guest additions. I started up my Ubuntu guest OS, clicked "Devices" and chose "Install Guest Additions". Nothing ...
snakile's user avatar
  • 6,213
349 votes
14 answers

How can I adjust the mouse scroll speed?

This question has been asked many times with no answer. I've used my basic Google skills and haven't come across a fix. This is system wide. My mouse simply scrolls too fast. I'm new to ubuntu and ...
Unisucs's user avatar
  • 3,491
582 votes
12 answers

How do I install Ubuntu alongside a pre-installed Windows with UEFI?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS. Should I do it with Wubi, or through the Live USB/DVD? What steps do I need to take ...
542 votes
18 answers

How can I create a Windows bootable USB stick using Ubuntu?

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine at the moment to do so. How can I achieve that using Ubuntu?
Zignd's user avatar
  • 10.8k
742 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.8k
825 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,729
789 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.3k
457 votes
8 answers

How do I change the GRUB boot order?

I have both Windows 7 and Ubuntu installed on a shared machine. Because a lot of the non-developers use Windows, I'd like to change the boot order to make it easier for them. Currently the boot order ...
chrisjlee's user avatar
  • 10.9k
297 votes
47 answers

How to fix "The system is running in low-graphics mode" error?

Note: This is an attempt to create a canonical question that covers all instances of "low-graphics mode" error that occurs to a user, including but not limited to installation of wrong ...
1639 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
517 votes
14 answers

Apache error "Could not reliably determine the server's fully qualified domain name"

When I restart my Apache server using the command sudo /etc/init.d/apache2 restart I get the following error: Restarting web server apache2 apache2: Could not reliably determine the server's fully ...
Deepu's user avatar
  • 5,317
599 votes
20 answers

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,766