Most Popular

1500 questions
143
votes
10 answers

Run same command again but as root

Sometimes when I run a command I don't notice that I needed to run it as super user to have enough permission. Is there a way to run the same command again but as a super user?
Trufa
  • 4,298
143
votes
14 answers

How to solve 'Connection refused' errors in SSH connection?

I have an Ubuntu Server 10.10 32-bit in my home. I'm making SSH connections to it from my PC via Putty. The problem is, sometimes I'm able to login seamlessly. However, sometimes it gives me an error like this: Network error: Connection…
frbry
  • 1,531
143
votes
4 answers

What exactly does `update-alternatives` do?

What is the command update-alternatives used for? Take this example: sudo update-alternatives --install /usr/bin/java java /usr/local/java/jre1.7.0_09/bin/java 1 What does it do? How is it different from adding jdk to the path? Let's say that I…
143
votes
7 answers

How do I set a shortcut to screenshot a selected area?

In gnome's screen shot program, the quick keys PrtScn captures the entire screen and alt+PrtScn captures the active window. Is there a way to script or set up the third capture option of a selected area? Update: I don't seem to have this key already…
Rick
  • 2,847
143
votes
7 answers

In SSH, how do I mv to my local system?

I ssh-ed into my webhost's directory, and tar-ed the webapp to download. When I try to mv to ~/mydirectory/backups or /home/mydirectory/backups, it defines the "home" as my root on the webhost that I'm ssh'ed into. How do I mv in ssh to a local…
JeanSibelius
  • 3,602
  • 8
  • 24
  • 27
142
votes
8 answers

How do I install and manage GNOME Shell extensions?

How do I install GNOME Shell extensions? Is it possible to update, remove and manage the extensions?
hhlp
  • 42,002
142
votes
5 answers

What is the CVE-2014-6271 bash vulnerability (Shellshock) and how do I fix it?

Recently, there have been news going around regarding "CVE-2014-6271" (See USN-2362-1), which is a vulnerability in Bash. How do I know if I am affected by this, how can I fix it, and why should I care? This is designed as a canonical answer for…
nanofarad
  • 20,717
142
votes
8 answers

Terminal command to show OpenGL version?

I want to find out the OpenGL version I'm using. I have access to Ubuntu via SSH. Which command shall I execute?
Kabumbus
  • 1,523
142
votes
5 answers

How to connect and disconnect to a network manually in terminal?

Since the network manager is troubling me so much I want to replace it (possibly wicd orNM from ppa:volanin). I do not know how to connect and disconnect to the network through the terminal without using network manager. I would like a command-line…
user7048
  • 1,421
141
votes
8 answers

What is the equivalent of 'Control-Alt-Delete'?

On Windows anytime the system hangs Ctrl-Alt-Del brings up the Start Up Manager, from which you can end the program or process causing the hang. Is there any command like this on Ubuntu?
Mysterio
  • 12,018
141
votes
8 answers

How do I disable my system from going to sleep?

I am getting a web server setup at home on an older AMD 2400+ desktop. I have Ubuntu 11.04 installed and running however, after a time, I can no longer browse to the server. When I go to the keyboard and press a key, everything magically works…
Mike Wills
  • 1,693
141
votes
12 answers

Home directory not being created

I am trying to understand system administration on Ubuntu. So, as an example, I create a dummy user using sudo useradd -d /home/linda linda and passwd to create the password. I check that an entry has been made using cat…
tchakravarty
  • 1,667
  • 3
  • 14
  • 15
141
votes
2 answers

How to add a shell script to launcher as shortcut

Possible Duplicate: How can I edit/create new launcher items in Unity by hand? How can I create launchers on my desktop? I want to add some shell scripts in my launcher as shortcuts.. They are located deep inside and i have to navigate to it…
Nirmik
  • 7,868
141
votes
8 answers

Increase partition size on which Ubuntu is installed?

I have Ubuntu installed on a drive. The problem is it is running low on disk space. This is installed on vmware. I expanded the virtual drive and booted into ubuntu. But when I opened gparted(sudo gparted), the move/resize option is unavailable.…
user51447
  • 1,847
141
votes
8 answers

"Package 'docker-ce' has no installation candidate" in 18.04

I'm following the official Docker installation guide for docker-ce on Ubuntu. When I get to sudo apt install docker-ce I get E: Package 'docker-ce' has no installation candidate: $ sudo apt-get update Hit:1 http://gb.archive.ubuntu.com/ubuntu bionic…
Robin Winslow
  • 2,626
  • 3
  • 20
  • 26