Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts
How to change the linux hostname?
# hostname
test.com
# hostname server.com
# hostname
server.com
# vi /etc/hostname
server.com
Now restart and see the changes.
Netstat in Linux
List all ports
# netstat -a | more
List all tcp ports using netstat -at
# netstat -at
List all udp ports using netstat -au
# netstat -au
List only listening ports
# netstat -l
List only listening TCP Ports using netstat -lt
# netstat -lt
List only listening UDP Ports using netstat -lu
# netstat -lu
List only the listening UNIX Ports using netstat -lx
# netstat -lx
Show statistics for all ports
# netstat -s
Show statistics for TCP/UDP ports
# netstat -st
# netstat -su
Display PID and program names
# netstat -pt
Don’t resolve host, port and user name
# netstat -an
Print netstat information continuously
# netstat -c
Find the non supportive Address families in your system
# netstat --verbose
Display the kernel routing information
# netstat -r
Find out on which port a program is running
# netstat -ap | grep ssh
Find out which process is using a particular port
# netstat -an | grep ':80'
Show the list of network interfaces
# netstat -i
Display extended information on the interfaces
# netstat -ie
# netstat -a | more
List all tcp ports using netstat -at
# netstat -at
List all udp ports using netstat -au
# netstat -au
List only listening ports
# netstat -l
List only listening TCP Ports using netstat -lt
# netstat -lt
List only listening UDP Ports using netstat -lu
# netstat -lu
List only the listening UNIX Ports using netstat -lx
# netstat -lx
Show statistics for all ports
# netstat -s
Show statistics for TCP/UDP ports
# netstat -st
# netstat -su
Display PID and program names
# netstat -pt
Don’t resolve host, port and user name
# netstat -an
Print netstat information continuously
# netstat -c
Find the non supportive Address families in your system
# netstat --verbose
Display the kernel routing information
# netstat -r
Find out on which port a program is running
# netstat -ap | grep ssh
Find out which process is using a particular port
# netstat -an | grep ':80'
Show the list of network interfaces
# netstat -i
Display extended information on the interfaces
# netstat -ie
Subscribe to:
Posts (Atom)