ravikhanal.com
域名年龄: 17年8个月17天HTTP/1.1 200 OK 访问时间:2019年06月14日 18:19:25 服务器:Apache/2.4.6 (CentOS) PHP/5.4.16 语言环境:PHP/5.4.16 X-Pingback: http://www.ravikhanal.com/xmlrpc.php Keep-Alive: timeout=5, max=100 连接:Keep-Alive Transfer-Encoding: chunked 类型:text/html; charset=UTF-8 网站编码:UTF-8
Ravi KhanalJust a Conceited BastardHomeAboutNetworking command in Unix and LinuxSeptember 9th, 2011Ravi KhanalNo commentsSome of the basic Networking commands in Unix and Linux are1. PingIt checks whether the host is alive.Ping www.ravikhanal.com2. nslookupnslookup is used to query the Domain Name System (DNS) to obtain the domain name or IP address mapping or for any other specific DNS record.nslookup google.com3. tracerouteTraceroute is used to print the route packets take to the network host. You can see the number of hops and response time to get to a remote system or web site from tracerote.traceroute www.google.com4. ifconfigIfconfig is used to set IP address temporarily and also to check ip address.ifconfig eth0 192.168.1.X —-set ip address temporarilyifconfig eth0 —————-display ip address, hardware address, subnet mask,….5. netconfigNetconfig sets up IP address permanentlynetconfig (press enter)ok192.168.1.X255.255.255.0enterenterokThen the network service should be restarted to update the new ip addressservice network restartNote: If netconfig is not working then the package is not installed. You can install rpm package system-config-network or neat( Network Administration Tool) which is used to set ip address in Graphical mode6. ifup/ ifdown / ethtoolifup will enable lan card#ifup eth0ifdown will disable lan card#ifdown ethoethtool will check whether the lan card is detected or not#ethtool eth0yes7. hostnameHostname command is used to set hostname temporarily and view hostnameto see hostname#hostname (press enter)to set hostname temporarily#hostname appXto make hostname permanent#vi /etc/hosts192.168.1.X appX#vi /etc/sysconfig/networkHOSTNAME=appX8. netstatnetstat displays network connections (both incoming and outgoing), routing tables, and a number of network interface and network protocol statisticsnetstat -anp | grep port will display the process id of application which is using that portnetstat -a or netstat -all will display all connections including TCP and UDPnetstat –tcp or netstat –t will display only TCP connectionnetstat –udp or netstat –u will display only UDP connectionnetstat -g will display all multicast network subscribed by the host.9. telnetTelnet connect (TCP) to a specific machine/port. You can use it to play with services other than telnet (Look in /etc/services for the list of services)#telnet hostname portIt will telnet hostname with the port specified.10. arparp displays and changes ARP (Address Resolution Protocol) cacheArp manipulates the kernel’s ARP cache in various ways. The primary options are clearing an address mapping entry and manually setting up one. For debugging purposes, the arp program also allows a complete dump of the ARP cache.#arp -a displays all 11. route route shows/ manipulates the IP routing table #route displays the current routing table or it can also be displayed by #/sbin/route or #/sbin/route -n Add a default gw for interfa
© 2010 - 2020 网站综合信息查询 同IP网站查询 相关类似网站查询 网站备案查询网站地图 最新查询 最近更新 优秀网站 热门网站 全部网站 同IP查询 备案查询
2025-06-26 21:18, Process in 0.0045 second.