Most Popular

1500 questions
647
votes
2 answers

How to redirect stderr to a file

While using nohup to put a command to run in background some of content appear in terminal. cp: error reading ‘/mnt/tt/file.txt’: Input/output error cp: failed to extend ‘/mnt/tt/file.txt’: Input/output error I want to save that content to a file.
646
votes
10 answers

How to list all enabled services from systemctl?

How can I list all enabled services from systemctl? I know running systemctl command by itself lists all services, but I would like to only get the enabled ones.
oceanBT
  • 6,697
  • 4
  • 13
  • 12
640
votes
10 answers

What is the difference between adduser and useradd?

What is the difference between the commands adduser and useradd on Ubuntu?
Joe Cabezas
  • 6,553
635
votes
47 answers

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 aggregate the top reasons for crontab scripts not…
Adam Matan
  • 12,919
634
votes
4 answers

How do I check the version of Ubuntu I am running?

How can I check my current Ubuntu version through the command-line and GUI?
LMatt
  • 6,465
  • 3
  • 12
  • 3
628
votes
25 answers

How to show the transfer progress and speed when copying files with cp?

Otherwise, is there any alternative command line utility that can achieve this?
628
votes
16 answers

How do I fix the GPG error "NO_PUBKEY"?

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following: W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified…
Agmenor
  • 16,394
627
votes
7 answers

Which one is better: using ; or && to execute multiple commands in one line?

In tutorials and how-to's I often see commands combined. For instance, sudo apt-get update && sudo apt-get install pyrenamer There seem to be four possible connectors: &, &&, || and ;. Though the & connector is clear to me (it sends a process to…
don.joey
  • 29,392
613
votes
16 answers

How to merge several PDF files?

There are a lot of software in Windows to merge PDF files but how can we do the same in Ubuntu?
607
votes
8 answers

How to install Google Chrome

How do you install Google Chrome on Ubuntu?
user314763
  • 6,087
  • 3
  • 13
  • 3
604
votes
20 answers

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: LANGUAGE = "en_US:en", LC_ALL = (unset), …
HackToHell
  • 6,826
600
votes
12 answers

How to let `dpkg -i` install dependencies for me?

Say, I have foo-1.2.3.deb which depends on perl and python, however, running command: dpkg -i ./foo-1.2.3.deb won't install these dependencies. So I must apt-get install perl python by hand. How to make dpkg -i install these dependencies for me…
Lenik
  • 10,608
593
votes
13 answers

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 happened, and I don't see the CD icon on my…
snakile
  • 6,363
592
votes
2 answers

How do I retrieve the public key from a SSH private key?

A SSH private key as generated by ssh-keygen contains a public key part. How do I retrieve this public key from the private key? I've lost my public key and need to put the contents of this public key in the servers authorized_keys file and do not…
Lekensteyn
  • 178,446
591
votes
3 answers

How do I use variables in a sed command?

I tried the following code to replace QQ with ZZ, but it doesn't do what I want: var1=QQ sed -i 's/$var1/ZZ/g' $file However, this code does what I want: sed -i 's/QQ/ZZ/g' $file How do I use variables in sed?
UAdapter
  • 17,967