一些 Linux 命令

2021-09-01 18:55:48 字數 341 閱讀 5568

偶爾需要用到,記錄一下:

[list]

[*]debian 6 預設不安裝 sudo, 所以需要安裝這個有用的工具 apt-get install sudo

[*]接下來需要設立 sudo 的許可權,我們不建議手動修改 /etc/sudoers 這個檔案,而是使用 visudo 來修改。可以再中間新增一行 user-name all=(all) nopasswd:all

[*]apt-get install zsh 我比較喜歡用 zsh,加上 oh-my-zsh 的指令碼非常的不錯。

[*]切換 shell 的環境可以使用 chsh -s /bin/bash 來搞定

[/list]

一些linux命令

rpm ql mplayer cat n檢視軟體包資訊 另外補充下 root centos5h wc help 用法 wc 選項 檔案 print newline,word,and byte counts for each file,and a total line if more than one...

一些Linux命令

1 打tar包檔案 tar cf all.tar filename1 filename2 2 檢視tar包檔案包含的檔案列表 tar tvf all.tar 注 tar常用引數 c 新建打包檔案,可搭配 v來檢視過程中被打包的檔名 t 檢視打包檔案的內容包含哪些檔名,重點在檢視檔名 x 解打包或解壓...

linux 一些命令

1.檢視cpu個數 cat proc cpuinfo grep physical id sort uniq wc l 2.檢視cpu邏輯個數 cat proc cpuinfo grep processor wc l 3.檢視cpu核數 cat proc cpuinfo grep cores uniq...