Linux基礎命令

來源:互聯網
上載者:User

標籤:

1. 為網卡配置靜態Ubuntu IP地址vi /etc/network/interfaces    auto eth0    iface eth0 inet static    address 192.168.0.5    gateway 192.168.0.254    netmask 255.255.255.0    dns-nameservers 223.6.6.6 2. 修改下載源vi /etc/apt/sources.listapt-get updateapt-get upgradeapt-get dist-upgrade 3. 關機/重啟shutdown -h nowreboot 4. 修改hostsvi /etc/hosts 5. 重啟網卡ifdown eth0 && ifup eth0 6. 修改主機名稱vi /etc/hostname 7. apt-get相關apt-cache search package 搜尋包apt-cache show package 擷取包的相關資訊,如說明、大小、版本等 apt-get install package 安裝包 apt-get update 更新源 apt-get upgrade 更新已安裝的包 apt-get dist-upgrade 升級系統  8. 查看進程ps -aux 9. 開啟路由轉寄功能vi /etc/sysctl.confnet.ipv4.ip_forward=1 10. 掛載光碟片mkdir /mnt/cdrommount /dev/cdrom /mnt/cdrom 11. 刪除非空檔案夾rm -rf /home/dir 12. 查看系統中的所有使用者cat /etc/passwdchen:x:1000:1000:chen,,,:/home/chen:/bin/bash使用者名稱: 密碼: uid: gid: 使用者描述: 主目錄: 登陸shell 

Linux基礎命令

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.