traceroute ip_addr/hostname顯示路由追蹤資訊
route顯示路由表
ifconfig [nic_name] [ip_addr[/]mask] [up/down]顯示/配置網絡卡資訊
netstat顯示網路狀態
程序優先順序(nice) 普通使用者只能調大nice值, 數字越小, 優先順序越高.
nice值範圍 -20 ~ 19 [100-139] (0-99是核心優先順序)
ctrl+z
前台執行的命令切換到後台並暫停
cmd &
啟動時後台執行
pstree顯示程序樹
top監控程序資訊
kill pid終止程序
killall process_name終止所有程序名為process_name的程序
renice nice pid修改已經啟動的程序的nice值
nice -n nice command指定啟動時的程序的nice值
jobs檢視後台作業, +為預設作業, -為第二預設作業.
終止作業:kill %job_id
bg [%job_id]停止後台作業
fg [%job_id]調回前台執行
命令只能臨時生效, 檔案配置能夠永久生效.
redhat系列(centos6.5)
全域性網路配置檔案 /etc/sysconfig/network
設定啟用網路和主機名
linux config
network=yes
hostname=myhost
網絡卡配置檔案(eth0)
/etc/sysconfig/network-scripts/ifcfg-eth0
靜態ip配置
linux config
device=eth0
ipaddr=192.168.233.1
netmask=255.255.255.0
network=192.168.233.254
onboot=yes
type=ethernet
bootproto=static
dhcp配置
linux config
device=eth0
onboot=yes
type=ethernet
bootproto=dhcp
重啟網路服務以生效
service network restart
debain系列(ubuntu14.04)
配置檔案 /etc/network/inte***ces
靜態ip配置
linux config
auto eth0
iface eth0 inet static
address 192.168.233.1
netmask 255.255.255.0
gateway 192.168.233.254
dhcp配置
linux config
auto eth0
iface eth0 inet dhcp
重啟網路服務以生效
sudo /etc/init.d/networking restart
Linux基礎 網路命令和程序管理
netstat lsof ps pstree pkill kill 了解jenkins git,排查環境 查詢伺服器之間是否有鏈結 netstat an 某個服務是否啟動 了解服務對應的啟動檔案,ps grep 了解服務對應的埠 netstat tunl grep 8080 檢視服務啟動的監聽埠 n...
Linux學習 程序和網路命令
ps 選項 檢視系統的程序常用引數 例項ps aux 等價於 ps ef 檢視所有的程序輸出的含義 ps常和重定向 管道命令一起使用,用於查詢所需的程序,例如 ps ef grep nginx 查詢nginx的程序資訊。kill 9 pid 殺死程序pidtop 實時監控程序狀況,占用cpu記憶體情...
Linux程序管理 網路 使用者管理相關命令
主要是一些命令 1 切換終端 ctrl alt f1 f7 2 檢視程序命令 1 ps a 列出當前所有使用者資訊 2 ps u 以使用者為主的格式來顯示程式狀況。3 ps x 顯示所有程式,不以終端機來區分。管道 指令的輸出作為指令2的輸入 指令1的輸出不顯示 3.kill l檢視所有命令。當使用...