Member-only story
Very useful and not much known Linux commands that you probably aren’t using in your daily life
2 min readApr 9, 2021
- redo the last command but as root
sudo !!
- open an editor to run a command (probably a long one)
ctrl + x + e
- create a super-fast disk for IO dependent tasks to run on it
mkdir -p /mnt/ramdisk && mount -t tmpfs tmpfs /mnt/ramdisk -o size=8192M
- don’t add the command to the history (add one space in front of the command)
ls -l
history # check the history
- Fix or change a really long command that you last ran with a text editor
fc
- create a tunnel with SSH to port that is not open to the public (local port 8080 -> remote host’s 127.0.0.1 on port 6070)
ssh -L 8080:127.0.0.1:6070 root@my-public-server.com -N
- Log output but don’t show it on the console
cat somefile | tee -a log.txt | cat > /dev/null
- Exit terminal but leave all processes running
disown -a && exit
- Clear your terminal without “clear” command
ctrl + l # L
- Paste the arguments of the previous command