Some useful Linux commands that you probably aren’t using in your daily life.
- The Tech Platform

- Sep 1, 2021
- 1 min read

redo the last command but as root
sudo !!open an editor to run a command (probably a long one)
ctrl + x + ecreate a super-fast disk for IO dependent tasks to run on it
mkdir -p /mnt/ramdisk && mount -t tmpfs tmpfs /mnt/ramdisk -o size=8192Mdon’t add the command to the history (add one space in front of the command)
ls -l
history # check the historyFix or change a really long command that you last ran with a text editor
fccreate 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 -NLog output but don’t show it on the console
cat somefile | tee -a log.txt | cat > /dev/nullExit terminal but leave all processes running
disown -a && exitClear your terminal without “clear” command
ctrl + l # LPaste the arguments of the previous command
alt + -Completely clean and clear your terminal
resetGet CPU info quickly
cat /proc/cpuinfoGet memory info quickly
cat /proc/meminfoRecursively find a text in a directory that have a lot of files in it
grep -rn /etc/ -e text_to_findFind files bigger than 100 MB
find -type f -size +100MB -exec ls -lah {} \;Create a web server in the current directory to serve files from it
python -m SimpleHTTPServerFind your public IP
curl ifconfig.meGet a tree view of folders only three levels deep
tree -L 3Get a tree view of processes
pstreeUse the last command’s last argument
!$EDIT: (29–08–2021)
Use the last command’s all arguments
!*The Tech Platform




Comments