Greatest Hits

1149 votes
24 answers
3.5m 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 ...
user avatar
1962 votes
9 answers
6.3m 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?
user avatar
  • 19.9k
576 votes
7 answers
3.7m views

How to install Google Chrome

How do you install Google Chrome on Ubuntu?
user avatar
  • 5,777
1233 votes
10 answers
3.2m 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.
user avatar
  • 12.6k
627 votes
14 answers
4.8m 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?
user avatar
  • 7,325
2443 votes
24 answers
4.6m 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?
user avatar
  • 53.8k
1003 votes
15 answers
1.9m 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 --...
user avatar
759 votes
4 answers
3.9m 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 ...
user avatar
  • 7,817
455 votes
16 answers
3.7m 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 ...
user avatar
  • 4,551
1171 votes
8 answers
3.4m 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 ...
user avatar
  • 11.9k
771 votes
16 answers
3.0m 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
1020 votes
9 answers
3.4m 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.
846 votes
9 answers
2.5m 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 ...
user avatar
  • 8,614
1297 votes
11 answers
3.8m views

How do I install a .deb file via the command line?

How do I install a .deb file via the command line?
user avatar
  • 24.7k
1035 votes
8 answers
3.2m 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 ...
user avatar
  • 14.6k
201 votes
12 answers
1.1m 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 ...
user avatar
  • 2,165
710 votes
9 answers
3.3m 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 ...
user avatar
  • 12.8k
926 votes
5 answers
2.6m views

How do I shut down or reboot from a terminal?

How can I shut down or reboot Ubuntu using terminal commands?
user avatar
  • 96.3k
553 votes
50 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 ...
user avatar
971 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 ...
user avatar
306 votes
7 answers
2.5m 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 ...
user avatar
  • 3,183
344 votes
6 answers
789k 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 ...
user avatar
  • 3,541
923 votes
7 answers
3.1m 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 ...
user avatar
  • 10.6k
734 votes
7 answers
2.6m 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?
user avatar
  • 17.1k
337 votes
6 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 (...
user avatar
  • 3,371
386 votes
43 answers
1.7m 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 ...
193 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
479 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 ...
user avatar
938 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 ...
user avatar
  • 68.7k
571 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 ...
1044 votes
15 answers
2.5m 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 (...
user avatar
865 votes
8 answers
1.8m 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?
user avatar
  • 10.5k
529 votes
17 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 with me at the moment to do so. How could I achieve the same using Ubuntu?
user avatar
  • 10.5k
214 votes
17 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 ...
918 votes
20 answers
1.3m 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 ...
user avatar
  • 10.6k
295 votes
46 answers
958k 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 ...
1047 votes
5 answers
1.3m 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 ...
user avatar
  • 37.1k
1288 votes
23 answers
1.2m 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-...
user avatar
  • 18.9k
1058 votes
13 answers
1.4m 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 ...
user avatar
  • 10.7k
903 votes
14 answers
1.1m 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?
user avatar
774 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?
user avatar
  • 8,179
503 votes
14 answers
1.7m 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 ...
user avatar
  • 5,177
537 votes
13 answers
2.2m 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 ...
user avatar
  • 5,803
616 votes
47 answers
1.2m 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 ...
312 votes
13 answers
433k 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 ...
user avatar
  • 3,121
408 votes
8 answers
1.7m 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 ...
user avatar
  • 10.1k
570 votes
20 answers
1.1m views

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: ...
user avatar
  • 6,456
674 votes
9 answers
2.0m views

What does "sudo apt-get update" do?

I am wondering what sudo apt-get update does? What does it update?
user avatar
  • 10.6k
1518 votes
26 answers
1.8m 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 ...
user avatar
658 votes
16 answers
1.4m 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?
user avatar
  • 10.9k