Tip Category 10 tips system-admin

System Admin

10 Total Tips
4 Beginner
5 Intermediate
1 Advanced
How to Kill Process by Port in Linux? Quick Answer: Use sudo kill -9 $(lsof -t -i:8080) to kill processes using port 8080. Replace 8080 with your target port. The lsof -t -i:PORT finds process IDs, and kill -9 forcefully terminates them. Essential for freeing up occupied ports. Essential Kill Process by Port Commands Frequently […]
Bash
sudo kill -9 $(lsof -t -i:8080)
luc 33 min read
Read Tip
How to Use Linux journalctl Command for Log Analysis? Quick Answer: Use journalctl -b to view current boot logs, journalctl -f to follow live logs, and journalctl -u servicename to check specific services. Filter with grep for errors: journalctl -b | grep "error". Essential for systemd log management and troubleshooting. Essential journalctl Command Examples Frequently […]
Bash
journalctl -b | grep "Timed out waiting"
luc 12 min read
Read Tip
How to Use Linux useradd Command for User Creation? Quick Answer: Use sudo useradd -m -s /bin/bash username to create a user with home directory and bash shell. Add groups with -G sudo,docker and set expiration with -e 2024-12-31. Always set password with sudo passwd username after creation. Essential useradd Command Examples Frequently Asked Questions […]
Bash
sudo useradd -m -s /bin/bash -G sudo,docker,www-data -c "Development User"...
luc 31 min read
Read Tip