Most Popular

1500 questions
562
votes
14 answers

How do I change the hostname without a restart?

I want to change the OS hostname but I do not want to restart. I have edited /etc/hostname but it requires a restart to get implemented. How to avoid this?
562
votes
10 answers

How do I create a permanent Bash alias?

I would like to create an alias to rm command in order to have a confirmation message after executing this command. So I am creating an alias like this alias rm='rm -i'. But as far as I know this is a temporary alias and it lives until you close the…
Bakhtiyor
  • 12,804
558
votes
8 answers

How to know what program is listening on a given port?

I suspect a program is listening on port 8000 on my machine. When I run the following command, I get this error: > python -m SimpleHTTPServer # Lots of python error socket.error: [Errno 98] Address already in use If I use another port (8000 is the…
yansal
  • 5,683
556
votes
11 answers

How to list all variables names and their current values?

How to list all variables names and their current values? Including not only $HOME, $PWD etc but any other you have defined.
Strapakowsky
  • 12,304
554
votes
10 answers

What are PPAs and how do I use them?

I keep reading about Personal Package Archives ('PPAs') and people answer questions with a link to a PPA. What's the best way to use these? There are multiple valid answers for this question spanning over several versions of Ubuntu. For your…
Jorge Castro
  • 73,717
550
votes
12 answers

How to really clear the terminal?

I can issue the clear command or press Ctrl + L to clear the current Ubuntu terminal, but this just shifts previous output upwards and if you use mouse scroll or PgUP and PgDown keys it's hard to distinguish where the output of previous command ends…
Stann
  • 15,416
548
votes
6 answers

What is "dist-upgrade" and why does it upgrade more than "upgrade"?

I was wondering why upgrade sometimes doesn't want to upgrade certain parts of the system, while dist-upgrade does. Here's an example after running apt-get upgrade: apt-get upgrade: rimmer@rimmer-Lenovo-IdeaPad-S10-2:~$ sudo apt-get upgrade Reading…
Frantisek
  • 8,998
546
votes
2 answers

How to install specific version of some package?

My questions are divided into two parts: How to know the version of installed package? How to install a specific package version?
user254258
544
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
  • 10,982
537
votes
32 answers

My computer boots to a black screen, what options do I have to fix it?

I am trying to boot Ubuntu on my computer. When I boot Ubuntu, it boots to a black screen. How can I fix this? Table of Contents: If you are trying to install Ubuntu If you have a dual boot system If an update or something else caused your…
Jorge Castro
  • 73,717
529
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 terminal?
Alex
  • 5,291
526
votes
11 answers

What are Unity's keyboard and mouse shortcuts?

In Unity, are there any pre-defined shortcuts, e.g. to open the dash or unhide the launcher?
htorque
  • 66,086
524
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 qualified domain name, using 127.0.1.1 for…
Deepu
  • 5,387
522
votes
13 answers

How to install software or upgrade from an old unsupported release?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found: $ sudo apt-get install vlc Reading package lists... Done Building dependency…
519
votes
7 answers

How can I get octal file permissions from command line?

There is a chmod command to set file permissions, but can I get file permissions in octal mode (such as 755) from the command line?
Anwar
  • 77,855