IndianWebPortal.com

Something Different In Linux

Home » Linux Commands » Basic Linux Network Commands:

Basic Linux Network Commands:

Posted by Rishikesh Vispute Categories: Linux Commands

Basic Linux Network Commands:
======================================
This category contains the most basic network commands available on Linux platform.
======================================
w
Shows who is currently logged in and where they are logged in from.
======================================
who
This also shows who is on the server in an shell.
======================================
netstat
Shows all current network connections.
======================================
netstat -an
Shows all connections to the server, the source and destination ips and ports.
======================================
netstat -rn
Shows routing table for all ips bound to the server.
======================================
netstat -an |grep :80 |wc -l
Show how many active connections there are to apache (httpd runs on port 80)
======================================
top
Shows live system processes in a formatted table, memory information, uptime and
other useful info.
======================================
While in top, Shift + M to sort by memory usage or Shift + P to sort by CPU usage.
======================================
top -u root
Show processes running by user root only.
======================================
route -n
Shows routing table for all ips bound to the server.
======================================
route add default gw my_computer
Add a default gateway to my_computer.
======================================
nslookup indianwebportal.com
Query your default domain name server (DNS) for an Internet name (or IP number)
host_to_find.
======================================
traceroute indianwebportal.com
Have a look how you messages travel to yahoo.com
======================================
tracepath indianwebportal.com
Performs a very similar function to traceroute.
======================================
ifconfig
Display info on the network interfaces.
======================================
ifconfig -a
Display into on all network interfaces on server, active or inactive.
======================================
ifconfig eth0 down
This will take eth0 (assuming the device exists) down, it won’t be able to receive or
send anything until you put the device back “up” again.
======================================
ifconfig eth0 up
You guessed it. This would take eth0 up and available to receive or send packets.
======================================
/sbin/ifconfig eth0 192.168.10.12 netmask 255.255.255.0 broadcast 192.168.10.255
Assign IP 192.168.10.12, netmask and broadcast address to interface eth0.
======================================
ifup eth0
Will bring eth0 up if it is currently down.
======================================
ifdown eth0
Will bring eth0 down if it is currently up.
======================================
ifcfg
Use ifcfg to configure a particular interface. Simply type ifcfg to get help on using
this script.
======================================
ifcfg eth0 del 192.168.0.1
This command takes eth0 down and removes the assigned IP 192.168.0.1
======================================
ifcfg eth0 add 192.168.0.2
This command brings eth0 up and assigns the new IP 192.168.0.2
======================================
ping
Sends test packets to a specified server to check if it is responding properly
======================================
ping indianwebportal.com
Sends echo requests to yahoo.com
======================================
mii-tool
Checks what your duplex settings are.
======================================
arp
Command mostly used for checking existing Ethernet connectivity and IP address
======================================
hostname
Tells the user the host name of the computer they are logged into.
======================================
findsmb
Used to list info about machines that respond to SMB name queries. findsmb with no
argument would find all machines possible. You can also specify a particular subnet
to localize search.
======================================
host indianwebportal.com
Performs a simple lookup of an internet address using DNS.
======================================
dig indianwebportal.com
The “domain information groper” tool. This example looks up information about
yahoo.com such as IP.
======================================
dig -x 66.94.234.13
Looks up the address and returns the associated domain name. dig takes a huge number
of options (at the point of being too many), refer to the manual page for more
information.
======================================
whois
Used to look up the contact information from the “whois” databases. Also reports IP
address and name server of domain as well as creation and expiration dates.
======================================
ftp
File transfer protocol. Transfers files to another host (insecure)
======================================
rdesktop
Display remote desktop on Linux Machine. You can use to connect to Windows.

2 Responses so far.

  1. your blog is useful for me. I learned more about linux commands. Now I bookmark your website for Cpanel management.


Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...