Skip to content

Instantly share code, notes, and snippets.

@rizkysyazuli
Last active July 5, 2021 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rizkysyazuli/b807428e484d8c9d798ff415eaf0d9f7 to your computer and use it in GitHub Desktop.
Save rizkysyazuli/b807428e484d8c9d798ff415eaf0d9f7 to your computer and use it in GitHub Desktop.
[Shell - Utilities] Useful Linux shell commands & utilities #shell #unix
# check active services
# https://explainshell.com/explain?cmd=ps+aux+%7C+grep+%27string%27
ps aux | grep 'service_name'
ps -ef | grep service_name
# check unix OS
cat /etc/os-release
hostnamectl
lsb_release -a # might not work in every distro
# Connect to OpenVPN
openvpn --config client.ovpn --auth-user-pass --auth-retry interact
# Check if port used
sudo lsof -i :3306
# List running services
systemctl --type=service --state=running
# Enable/disable services
systemctl enable name
systemctl disable name
# Process monitor
top
htop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment