很久之前,在CentOS7版本發行的時候,我就知道這個狀況
當時我所使用到的linux環境,仍以ubuntu為主
完全沒有企業伺服器架設的需求(其實ubuntu比較是我常拿來架設企業伺服器的distribution)
當然,該面對的還是要面對,該學的一個也逃不掉
CentOS7 與先前版本指令的差異,我會用到的地方,做了一些整理
ifconfig 指令不見了
取而代之的是
ip addr
service xxx status
service xxx start
service xxx stop
變成
systemctl status xxx
systemctl start xxx
systemctl stop xxx
列出全部服務
systemctl list-unit-files
列出可用的運作層級
systemctl list-units –type target
顯示目前系統預設運作層級
systemctl get-default
切換運作層級至文字模式 runlevel 3
systemctl isolate multi-user.target
設定開機啟動至文字模式 runlevel 3
systemctl set-default multi-user.target
netstat 改成 ss
#TCP listen
ss -lt
#UDP listen
ss -ul
#TCP 連線
ss -t
traceroute/traceroute6 改用 tracepath
route 改用 ip -route
arp 改用 ip nei 網路中的arp
# ip neighbor
6. 介面開關
# ifconfig eth1 up
# ifconfig eth1 down
改為
# ip l set eth1 up
# ip l set eth1 down
學到新指命,強迫重抓dhcp
dhclient -v
隨機文章
- 歧見~還是歧現?NowNEWS (2009-03-11)
- XenServer 線上備份 online backup (2016-08-14)
- 自動刪除舊檔案 / 老舊備份 Linux上的指令不錯用 (2022-07-10)
- 又被Google Adsense警告了 (2010-09-29)
- 我發現FB會以手機號碼給朋友建議 (2015-10-19)






![[ChatGPT] 4o的圖片視覺測試](https://chihping.aflypen.com/wp-content/uploads/2024/09/eye-4367141_640-300x200.jpg)

