mayurwaghmode / use-to-commands

1 stars 0 forks source link

Network commands #2

Open mayurwaghmode opened 2 years ago

mayurwaghmode commented 2 years ago

How to check if the port is in use in

Run any one of the following commands on Linux to see open ports:

sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
sudo ss -tulpn | grep LISTEN
sudo lsof -i:22 ## see a specific port such as 22 ##
sudo nmap -sTU -O IP-address-Here
mayurwaghmode commented 2 years ago

To check the disk usage of directory du dir-name -h

CPU usage

top
htop
ps aux | grep process-name
mayurwaghmode commented 2 years ago

get your kernel version or know which distribution you are using

uname -a
neofetch
mayurwaghmode commented 2 years ago

How to get your current IP address?

ifoconfig
ip addr show eth0