Most Popular

1500 questions
336
votes
7 answers

How to restart X Window Server from command line?

How can I restart X Window Server from the command line? I'd really like to be able to restart my GUI without having to do a full system reboot.
335
votes
6 answers

How to install specific Ubuntu deb packages, with exact version?

I want to setup a new virtual machine with some specified packages (name and version), that are provided. For example, apache2 in version 2.2.20-1ubuntu1 with all dependencies. Even if there is a new version of this package on the servers this one…
ayckoster
  • 3,597
335
votes
7 answers

Reset the password in Ubuntu / Linux Bash in Windows

I have installed Linux Bash on Windows 10 (available from Microsoft), but I've forgotten my password. I've searched for a solution but I only find suggestions that involve doing something before the system boots, like accessing recovery mode, but…
334
votes
9 answers

What is the difference between "Redirection" and "Pipe"?

This question may sound a bit stupid, but I can not really see the difference between redirection and pipes. Redirection is used to redirect the stdout/stdin/stderr, e.g. ls > log.txt. Pipes are used to give the output of a command as input to…
John Threepwood
  • 3,647
  • 5
  • 17
  • 12
333
votes
11 answers

How do I view all available HDD's/partitions?

I found a 6 GB IDE HDD in my basement. I want to plug it in and see what might be on it. The drive seems to be recognized in BIOS. I can't find it in Ubuntu to view files, and Ubuntu is the only OS on that particular computer. I was wondering if…
332
votes
14 answers

How do I check if a package is installed on my server?

I recently installed Ubuntu Server edition 13.10 (Saucy Salamander). But I have run into a bit of problem. At the end of the installation, it asks about several extra packages whether you want them or not, like OpenSSH server and virtual machine…
D.Zou
  • 3,619
  • 4
  • 17
  • 19
331
votes
2 answers

Dwarf Fortress starting during apt-get upgrade

When I run apt-get upgrade on my Ubuntu 17.04 machine, sometimes it starts Dwarf Fortress by itself. It has happened already at least two times, so it was probably not just some sort of one time thing. Also, the execution ofapt-get upgrade seemed to…
Adrijaned
  • 1,708
331
votes
5 answers

How can I configure a service to run at startup

I have a daemon that runs fine if I start it manually with the service command: ricardo@ricardo-laptop:~$ sudo service minidlna start * Starting minidlna minidlna [ OK…
330
votes
20 answers

How to list manually installed packages?

I'd like to get a list of packages installed manually by apt or aptitude and be able to find out whether a foobar package was installed manually or automatically. How can we do that from the command line?
Umang
  • 6,473
329
votes
7 answers

How to run the SSH server on a port other than 22

I have two computers behind the same router. Let's call them A and B. A can SSH to B in the following manner: ssh usr@ B can SSH to A by doing the same, but the external IP must be used. I have forwarded port 22 of my router…
Gary
  • 3,914
328
votes
10 answers

SSH returns: no matching host key type found. Their offer: ssh-dss

I am accustomed to using Putty on a Windows box or an OSX command line terminal to SSH into a NAS, without any configuration of the client. Ubuntu 16.04 attempts to SSH into the NAS (via LAN): ssh root@192.168.8.109 Unable to negotiate with…
gatorback
  • 5,785
  • 9
  • 40
  • 65
324
votes
5 answers

Give specific user permission to write to a folder using +w notation

I know I can assign the permission to write to an owner/group/others like this: chmod u+w myfolder Can I specify the specific user here? Some like this: chmod username u+w myfolder
Max Koretskyi
  • 3,691
  • 4
  • 17
  • 19
324
votes
12 answers

How to install OpenJDK 8 on 14.04 LTS?

Java 8 is now available according to http://openjdk.java.net/projects/jdk8/, but http://openjdk.java.net/install/ does not yet mention how to install OpenJDK 8 (not Oracle Java) on Ubuntu 14.04 Long Term Support. (For 14.10 and later just run…
323
votes
2 answers

Change password on root user and user account

If I change the password for the root user is that going to automatically change the password for the user account? I found this link for root: WikiHow: How to Change the Root Password in Linux How do I change the user account password?
Alisha
  • 3,341
  • 2
  • 14
  • 8
323
votes
7 answers

How to access a usb flash drive from the terminal?

I only have access to the command line. I need to backup my data (on the user folder) to a pen (USB DOK). How can I mount a flash drive manually? What should be the copy command?
MEM
  • 11,065