Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Common Network Management commands (part I)

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Ifconfig: network interface configuration command

Command syntax:

Ifconfig: displays all active interface information

Ifconfig [interface]: displays the specified interface information

Example: ifconfig eth0

Ifconfig [interface] [up | down]: temporarily starts or shuts down the specified network interface

Example: ifconfig eth0 down

Ifup eth0:1

Ifdown

Ifconfig [interface] [ipaddr] netmask [mask]: temporarily configure ip address

Example: ifconfig eth0:0 192.168.10.1 netmask 255.255.255.0

Ifconfig eth2 192.168.100.1/24

Route: routing table management command

Command syntax:

Route: displaying routing information

-n: address in numeric format

Route add: adding routing information

-host: destination host rout

Example: route add-host 10.0.0.5 gw 192.168.0.1

-net: destination network rout

Example: route add-net 172.0.0.0Plus 24 gw 192.168.1.1

Route add-net 0.0.0.0 gw 10.0.0.1

Route add default gw 10.0.0.1

Route del: deleting routing information

-host: destination host rout

Example: route del-host 10.0.0.1

-net: destination network rout

Example: route del-net 172.0.0.0According to 24

Netstat: view the network and related information

-t: display tcp information

-u: displays udp information

-p: displays process information

-l: displays monitoring information

-n: do not parse the host name

-a: show all information

-e: display extended information

-m: displays socket-related memory usage information

-o state: only connections in the specified state are displayed, and filter criteria can be specified

Example: netstat-anpu

Ping: a Network testing tool based on ICMP Protocol

Command syntax:

Ping [destination]:

-c: number of messages

Example: ping-c 1 192.168.1.1

-W: timeout for waiting for a response message

Example: ping-W 1 10.0.0.1

Traceroute: tracks all gateways through which network packets reach the target host, depending on the traceroute package

Command syntax:

Traceroute [destination]:

Example: traceroute www.baidu.com

Mtr: network diagnostic tool, similar to traceroute, dependent on mtr software package

Command syntax:

Mtr [destination]:

Example: mtr www.baidu.com

Nslookup: the resolution correspondence between domain name and IP, depending on bind-utils software package

Command syntax:

Nslookup [destination]

Example: nslookup www.baidu.com

Nslookup 220.181.112.244

Hostname: displays or configures the system hostname

Command syntax:

Hostname: displays the host name of the host

Hostname [hostname]: change the native hostname

Example: hostname princepar.blog.51cto.com

Ethtool: displays attribute information for network interface devices

Command syntax

Ethtool [devname]:

Example: ethtool eth0

Ethtool-S [devname]: data information for statistical device interfaces

Example: ethtool-S eth0

Can be used with the watch command: watch "ethtool-S eth0"

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report