Post

Useful Linux and Unix commands

Debian/Ubuntu Useful Commands

Check OS version

1
cat /etc/os-release

Search text from terminal

1
grep -rnwi '/path/file.js' -e 'keyword_not_case_sensitive'

Show some logs, contents from line X to Y

1
2
3
X=1
Y=5
sed -n -e "$X,$Y p" -e "$Y q" file_name.txt

Kill a process on a specific port

1
2
sudo kill -9 30 // Kill process ID = 30
sudo kill -9 $(sudo lsof -t -i:8080) // Find process on port 8080 and kill it

Alpine Useful Commands

Updating…

References

This post is licensed under CC BY 4.0 by the author.