網絡卡
網絡卡名假如為 eth0
啟用網絡卡命名 ifconfig eth0 up
禁用網絡卡命名 ifconfig eth0 down
重啟網絡卡 systemctl restart network
檢視埠
lsof -i tcp:80
列出所有埠
netstat -ntlp
#檢視埠被誰占用
netstat -lnp|grep 88
如果是最小化安裝的虛擬化,會發現無法使用 ifconfig命令,需要安裝 yum install net-tools
vm net模式下無法ping通外網
#編輯網絡卡 把ip和網管以及dns改了即可
vim /etc/sysconfig/network-scripts/ifcfg-ens33
type=ethernet
proxy_method=none
browser_only=no
bootproto=static
defroute=yes
ipv4_failure_fatal=no
ipv6init=yes
ipv6_autoconf=yes
ipv6_defroute=yes
ipv6_failure_fatal=no
ipv6_addr_gen_mode=stable-privacy
name=ens33
uuid=d76b0b36-e4c6-4d6e-b528-bf495f08e3e3
device=ens33
onboot=yes
ipaddr=192.168.0.121
network=255.255.255.0
gateway=192.168.0.2
dns1=192.168.16.1
檢視防火牆狀態
firewall-cmd --state
解決ssh遠端登陸慢
#在sshd_config檔案中修改以下兩個設定為no(如果被注釋了記得取消注釋)
gssapiauthentication no
usedns no
#重啟服務
systemctl restart sshd
linux 7 網路相關
檢視網絡卡情況 ifconfig ip addr 檢視網絡卡流量 ip s link show 檢視本地路由 route n ip route 檢視目標路徑 traceroute tracepath 檢視本地埠 netstat anpt ss tln 使用linux 6版本格式的網絡卡命名模式 2 ...
LINUX7 網路配置
通過nat網路模式下進行連線 windows的虛擬網絡卡和linux的形成自網路進行通訊,而windows的真實網絡卡與整個網路與外界通訊,而教師網路與閘道器互動與internet相連通訊 windows至少存在2塊網絡卡 1 檢視linux的虛擬網路編輯器 且可進行修改ip 檢視 虛擬網路編輯器進...
Centos7 網絡卡配置
進入網絡卡配置檔案目錄 cd etc sysconfig network scripts編輯配置檔案 vim ifcfg ens33type ethernet proxy method none browser only no bootproto static 使用靜態ip位址,預設為dhcp ip...