Most Popular
1500 questions
89
votes
9 answers
keyserver timed out when trying to add a GPG public key
I am trying to add a public key for installing a program with CPG. But I am pretty new to this but every command I found gave me the same error:
gpg --keyserver keyserver.ubuntu.com --recv-keys 94558F59
gpg: requesting key 94558F59 from hkp server…

Sander Van der Zeeuw
- 1,541
89
votes
3 answers
scp and compress at the same time, no intermediate save
What is the canonical way to:
scp a file to a remote location
compress the file in transit (tar or not, single file or whole folder, 7za or something else even more efficient)
do the above without saving intermediate files
I am familiar with shell…

Robottinosino
- 5,321
89
votes
6 answers
Redirecting the content of a file to the command "echo"
I have a file named my_file.txt whose content is just the string Hello. How could I redirect its content to the command echo?
I know I have the commands less, cat, more... but I need to do it with echo.
I tried this:
$ cat my_file.txt | echo
and…

danielmbcn
- 1,085
89
votes
3 answers
How do I start a Cron job 1 min after @reboot?
I need my script to be executed a minute after each reboot. When I apply @reboot in my crontab it is too early for my script - I want the script to be executed after all other tasks that are routinely run on reboot. How might I run the script…

Yurij73
- 1,992
89
votes
7 answers
How can I safely remove a SATA disk from a running system?
I sometimes need to plug a disk into a disk bay. At other times, I have the very weird setup of connecting a SSD using a SATA-eSATA cable on my laptop while pulling power from a desktop.
How can I safely remove the SATA disk from the system? This…

Lekensteyn
- 20,830
89
votes
4 answers
How to run a script with systemd right before shutdown?
What do I need to put in the [install] section, so that systemd runs /home/me/so.pl right before shutdown and also before /proc/self/net/dev gets destroyed?
[Unit]
Description=Log Traffic
[Service]
ExecStart=/home/me/so.pl
[Install]
?

sid_com
- 1,571
89
votes
8 answers
Can I connect to Windows machine from Linux shell?
I can connect to Linux machines from Windows using PuTTY/SSH. I want to do the other way round - connect to a Windows machine from Linux.
Is this possible?

vis
- 1,017
89
votes
6 answers
How do I quit from vi?
I'm new to vi. I started vi on my Ubuntu machine and I can't quit. I see the editor and I can write text, at the bottom line there is a label "recording".
How do I quit the vi editor?

Jonas
- 1,593
89
votes
3 answers
What is the bash shortcut to change to the previous directory?
Sadly, I only learned about this last year by stumbling upon it randomly on the internet. I use it so infrequently that I always forget what it is by the time I need it again.
How do you change to your previous directory?

hobodave
- 1,193
89
votes
4 answers
How to close (kill) ssh ControlMaster connections manually
With the following .ssh/config configuration:
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
ControlPersist 4h
How to close the persisting connection before the 4 hours?
I know you can make new connections, but how to close them (all)?
Maybe…

Paolo
- 1,535
89
votes
3 answers
show gateway IP address when performing ifconfig command
Currently, when using the ifconfig command, the following IP addresses are shown:
own IP, broadcast and mask.
Is there a way to show the related gateway IP address as well (on the same screen with all the others, not by using 'route' command)?

amigal
- 1,955
89
votes
3 answers
What is the difference between these commands for bringing down a Linux server?
Reading "What is the difference between Halt and Shutdown commands?" , I generally have an idea what does the command shutdown does, with or without -h/-r options.
The "halt" command performs power off of the system to run-level 0 of
the…

Win.T
- 1,125
89
votes
25 answers
Tricks and tips for finding information in man pages
Does anyone have any tricks and tips for finding information in man pages?

Casebash
- 1,051
89
votes
5 answers
'chmod g+s' command
Hello I want to understand the role of the chmod g+s command in Unix.
I also would like to know what it does in this particular context:
cd /home/canard;
touch un;
chgrp canard .;
chmod g+s .;
touch deux ;
I understand all the commands roles except…

otus
- 991
89
votes
2 answers
Nslookup: command not found error on RHEL/CentOS 7
During linux installation I selected "minimal" option:
When I went to run the nslookup command to look up an IP address I got the error message nslookup: command not found as shown in the example below.
$ nslookup www.google.com
bash: nslookup:…

Anthony Ananich
- 7,334
- 5
- 33
- 45