Greatest Hits

1163 votes
25 answers
3.6m views

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
2087 votes
9 answers
6.9m views

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.1k
1342 votes
10 answers
3.6m 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
  • 13.7k
591 votes
8 answers
3.8m views

How to install Google Chrome

How do you install Google Chrome on Ubuntu?
user314763's user avatar
  • 5,927
668 votes
14 answers
5.1m views

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,745
1082 votes
16 answers
2.2m views

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
2539 votes
25 answers
4.9m views

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
  • 55.6k
777 votes
4 answers
4.1m views

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
  • 7,997
485 votes
16 answers
4.0m 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
  • 4,851
1262 votes
8 answers
3.7m views

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
  • 12.8k
788 votes
16 answers
3.1m views

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
1049 votes
9 answers
3.6m views

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.
1384 votes
12 answers
4.0m 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
  • 25.8k
866 votes
9 answers
2.6m 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,814
228 votes
13 answers
1.3m views

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,435
1091 votes
8 answers
3.3m views

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.2k
743 votes
9 answers
3.5m 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
  • 13.7k
368 votes
7 answers
883k views

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,781
335 votes
7 answers
2.7m views

"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,473
567 votes
51 answers
1.3m views

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
940 votes
5 answers
2.7m views

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
  • 99.8k
1571 votes
28 answers
1.6m views

"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
  • 22.1k
974 votes
15 answers
2.0m views

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
772 votes
7 answers
2.8m views

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
  • 17.7k
948 votes
7 answers
3.2m 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
  • 10.8k
349 votes
7 answers
1.1m views

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,491
397 votes
43 answers
1.8m views

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 ...
140 votes
2 answers
553k views

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. ...
dsha256's user avatar
  • 1,558
201 votes
7 answers
1.7m 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
1126 votes
16 answers
2.8m views

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
1115 votes
5 answers
1.5m views

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 docker.io. It also does not work without sudo: sudo docker.io ps ...
Flimm's user avatar
  • 39.7k
362 votes
11 answers
263k views

Pending Update of Snap Store

What's with 'Pending Update of Snap Store?'
Costa Michailidis's user avatar
897 votes
8 answers
1.9m views

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
  • 11k
960 votes
12 answers
1.9m views

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
  • 70.6k
956 votes
14 answers
1.2m views

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
480 votes
13 answers
1.5m views

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
1130 votes
13 answers
1.6m views

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.4k
942 votes
20 answers
1.4m views

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
  • 10.9k
216 votes
18 answers
1.8m views

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 ...
577 votes
12 answers
1.8m views

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 ...
539 votes
18 answers
1.7m views

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.7k
338 votes
14 answers
492k views

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,381
297 votes
46 answers
964k views

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 ...
559 votes
13 answers
2.4m views

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,023
806 votes
22 answers
1.6m views

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,529
512 votes
14 answers
1.8m views

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,267
1598 votes
27 answers
1.9m views

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
444 votes
8 answers
1.8m views

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.7k
631 votes
47 answers
1.3m views

Why crontab scripts are not working?

Often, crontab scripts are not executed on schedule or as expected. There are numerous reasons for that: wrong crontab notation permissions problem environment variables This community wiki aims to ...
711 votes
16 answers
1.5m views

How to check Internet Speed via Terminal?

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