国产成人 综合 亚洲欧美,羞羞影院成人午夜爽爽在线,中文字幕av在线一二三区,午夜私人成年影院在线观看,男人把大ji巴放进女人视频

okx

Linux終端網(wǎng)絡(luò)配置指南

時(shí)間:2023-06-23|瀏覽:246

這是一系列基礎(chǔ)命令的集合,我會(huì)從使用角度介紹,看完這些以后你能夠在Linux終端下完成大部分之前需要鼠標(biāo)和鍵盤才能完成的操作。

今天是第五篇,介紹Linux下基礎(chǔ)的網(wǎng)絡(luò)操作命令。

網(wǎng)卡信息 ``` ubuntu@ubuntu-virtual-machine:~$ ifconfig ens33: flags=4163 mtu 1500 inet 192.168.115.138 netmask 255.255.255.0 broadcast 192.168.115.255 inet6 fe80::a1ed:ba47:821f:8b10 prefixlen 64 scopeid 0x20 ether 00:0c:29:51:ad:60 txqueuelen 1000 (Ethernet) RX packets 8665 bytes 12475254 (12.4 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1103 bytes 98183 (98.1 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 188 bytes 16340 (16.3 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 188 bytes 16340 (16.3 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ```

網(wǎng)絡(luò)配置 主要列舉幾個(gè)我們?cè)诠ぷ髦锌赡軙?huì)用到的操作: 關(guān)閉指定網(wǎng)卡 ``` #ifconfig eth0 down #關(guān)閉eth0 ```

開(kāi)啟指定網(wǎng)卡 ``` #ifconfig eth0 up #開(kāi)啟eth0 ```

修改指定網(wǎng)卡信息 ``` #ifconfig eth0 down #關(guān)閉網(wǎng)卡 #ifconfig eth0 hw ether 00:11:22:33:44:55 #修改eth0網(wǎng)卡MAC地址 #ifconfig eth0 up #啟動(dòng)網(wǎng)卡 ``` ``` #ifconfig eth0 192.168.3.178 #給eth0網(wǎng)卡配置IP地址 #ifconfig eth0 192.168.3.178 netmask 255.255.255.0 #給eth0網(wǎng)卡配置IP地址,并加上子掩碼 #ifconfig eth0 192.168.3.178 netmask 255.255.255.0 broadcast 192.168.3.255 #給eth0網(wǎng)卡配置IP地址,加上子掩碼,加上個(gè)廣播地址 ```

啟動(dòng)/關(guān)閉ARP協(xié)議 如果對(duì)網(wǎng)絡(luò)不熟悉可能不了解什么是ARP,但是這個(gè)協(xié)議在開(kāi)發(fā)中是經(jīng)常被用到的,可以先了解一下。 ``` #ifconfig eth0 arp #開(kāi)啟eth0網(wǎng)卡ARP #ifconfig eth0 -arp #關(guān)閉eth0網(wǎng)卡ARP ```

設(shè)置MTU MTU是包或幀的最大長(zhǎng)度,一般單位是字節(jié)。如果MTU過(guò)大,在碰到路由器時(shí)會(huì)被拒絕轉(zhuǎn)發(fā),因?yàn)樗荒芴幚磉^(guò)大的包。如果太小,因?yàn)閰f(xié)議一定要在包(或幀)上加上包頭,那實(shí)際傳送的數(shù)據(jù)量就會(huì)過(guò)小,這樣也劃不來(lái)。大部分操作系統(tǒng)會(huì)提供給用戶一個(gè)默認(rèn)值,該值一般對(duì)用戶來(lái)說(shuō)是比較合適的。 ``` #ifconfig eth0 mtu 1500 #設(shè)置MTU1500字節(jié) ```

ping命令 ping命令一般用來(lái)測(cè)試網(wǎng)絡(luò)連通狀態(tài),但是一定要注意,并不是說(shuō)沒(méi)有ping通就表示網(wǎng)絡(luò)不通,因?yàn)榫W(wǎng)絡(luò)可以配置ping的功能,但是大多數(shù)情況下都有這個(gè)服務(wù)。

使用非常簡(jiǎn)單,ping命令緊接著一個(gè)IP或者域名地址,需要手動(dòng)輸入CTRL+C結(jié)束。 ``` ubuntu@ubuntu-virtual-machine:~$ ping 192.168.3.178 PING 192.168.3.178 (192.168.3.178) 56(84) bytes of data. 64 bytes from 192.168.3.178: icmp_seq=1 ttl=128 time=4.90 ms 64 bytes from 192.168.3.178: icmp_seq=2 ttl=128 time=5.08 ms 64 bytes from 192.168.3.178: icmp_seq=3 ttl=128 time=5.26 ms ^C --- 192.168.3.178 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 4.904/5.081/5.260/0.145 ms

ubuntu@ubuntu-virtual-machine:~$ ping www.baidu.com PING www.a.shifen.com (14.215.177.39) 56(84) bytes of data. 64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=1 ttl=128 time=34.2 ms 64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=2 ttl=128 time=33.5 ms 64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=3 ttl=128 time=33.8 ms 64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=4 ttl=128 time=36.1 ms ^C --- www.a.shifen.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3007ms rtt min/avg/max/mdev = 33.524/34.393/36.068/0.992 ms ```

介紹幾個(gè)常用的參數(shù): -c 指定ping的包數(shù)。 ``` ubuntu@ubuntu-virtual-machine:~$ ping -c 5 www.baidu.com PING www.a.shifen.com (14.215.177.39) 56(84) bytes of data. 64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=1 ttl=128 time=34.8 ms 64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=2 ttl=128 time=35.4 ms 64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=3 ttl=128 time=36.8 ms 64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=4 ttl=128

熱點(diǎn):nft終端 礦機(jī)配置 比特幣指南 nft指南 幣圈指南

歐易

歐易(OKX)

用戶喜愛(ài)的交易所

幣安

幣安(Binance)

已有賬號(hào)登陸后會(huì)彈出下載

« 上一條| 下一條 »
區(qū)塊鏈交流群
數(shù)藏交流群

合作伙伴

幣圈論壇 天天財(cái)富 秒懂域名 幣圈交流群 玩票票財(cái)經(jīng) 減肥瘦身吧 去玩唄SPA 趣玩幣 聚幣網(wǎng) 代特幣圈 元宇宙Web 玩合約 借春秋 借春秋財(cái)經(jīng) 百科書(shū)庫(kù) 兼職信息網(wǎng) 金色幣圈 數(shù)字財(cái)經(jīng) 皮卡丘資訊 談股票 裝修裝飾網(wǎng) 美白沒(méi)斑啦 茶百科 幣圈官網(wǎng) 百悅米 非小號(hào)行情 培訓(xùn)資訊網(wǎng) 旅游資訊網(wǎng) 谷歌留痕 寶寶起名 數(shù)字黃金 黃金行情 媽媽知道 今日黃金 幣圈ICO官網(wǎng) 愛(ài)網(wǎng)站 周公解夢(mèng)
非小號(hào)交易所排名-專業(yè)的交易行情資訊門戶網(wǎng)站,提供區(qū)塊鏈比特幣行情查詢、比特幣價(jià)格、比特幣錢包、比特幣智能合約、比特幣量化交易策略分析,狗狗幣以太坊以太幣玩客幣雷達(dá)幣波場(chǎng)環(huán)保幣柚子幣萊特幣瑞波幣公信寶等虛擬加密電子數(shù)字貨幣價(jià)格查詢匯率換算,幣看比特兒火幣網(wǎng)幣安網(wǎng)歐易虎符抹茶XMEX合約交易所APP,比特幣挖礦金色財(cái)經(jīng)巴比特范非小號(hào)資訊平臺(tái)。
非小號(hào)行情 yonghaoka.cn 飛鳥(niǎo)用好卡 ?2020-2024版權(quán)所有 桂ICP備18005582號(hào)-1