Linux下shell命令 1,linuxshell命令

來源:互聯網
上載者:User

Linux下shell命令 1,linuxshell命令

1   [root@hadoop-namenode-1 iebd] cd /filename/filename  跳轉至filename檔案夾

2   [root@hadoop-namenode-1 iebd] ls 顯示所在目錄下的所有檔案和檔案夾

3   [root@hadoop-namenode-1 iebd] ifconfig 查看網卡資訊,包括IP,子網路遮罩,MAC地址【想要查看某個具體的網卡資訊,在其後添加網卡name即可,如 ifconfig eth0】

4   查看DNS  DNS配置資訊儲存在/etc/resolv.conf,跳轉至/etc目錄下,利用cat命令開啟resolv.conf檔案,會出現nameserver  ***.***.***.***即DNS地址

5   查看每個網卡的具體配置資訊在/etc/sysconfig/network-scripts檔案夾裡,比如eth1的配置資訊在ifcfg-eth1,開啟檔案可以看到

DEVICE=eth1 //裝置名稱
HWADDR=0C:C4:7A:18:8C:07 //MAC地址
TYPE=Ethernet  //乙太網路卡
UUID=8570239f-a36e-4181-b7cd-acd86de6985b
ONBOOT=yes
NM_CONTROLLED=yes
IPV6INIT=no
USERCTL=no
BOOTPROTO=static
PEERDNS=yes
PEERROUTES=yes
IPADDR=192.168.99.30 //ip地址
NETMASK=255.255.255.0 //子網路遮罩
GETWAY=           192.168.99.1 //網關地址

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.