linux命令列備忘

來源:互聯網
上載者:User

使用者管理:

sudo passwd root:設定root密碼

su root:進入root使用者

檔案和檔案夾操作:

touch filename:建立檔案

rm -rf /a/b/c:移除非空目錄

tar -xjvf filename.tar.bz2:解壓.tar.bz2檔案
tar -xvf filename.tar.bz:解壓.tar.bz檔案

du
統計檔案大小相加: du -h --max-depth=1 ./

df  統計資料區塊使用方式 df -h

wc -l filename 報告行數

wc -w filename 報告單詞數
wc -c filename 報告位元組數
wc -m filename 報告字元數

許可權和安全:

sudo command :以系統管理員root的身份運行command命令

#
chmod -R 777 /var/home/userid/cc :修改檔案夾及其子檔案夾的存取權限


軟體管理:

# apt-get install
yum:安裝yum查詢

# apt-get remove
firefox:卸載firefox

# yum install
firefox:安裝firefox

java -version:查看java版本

sudo update-alternatives --config java:設定java預設版本


網路:

ifconfig:查看ip

netstat -nat|grep -i ":80"|wc -l#查看80連接埠串連數


搜尋命令:

http://www.cnblogs.com/wblade/archive/2010/10/29/1864721.html


相關文章

聯繫我們

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