《linux基本命令》

2021-06-01 13:15:03 字數 854 閱讀 2191

博主部落格: 斷橋殘雪

uname 顯示版本資訊(同win2k的 ver)

dir 顯示當前目錄檔案,ls -al 顯示包括隱藏檔案(同win2k的 dir)

pwd 查詢當前所在的目錄位置

cd cd ..回到上一層目錄,注意cd 與..之間有空格。cd /返回到根目錄。

cat 檔名 檢視檔案內容

cat >abc.txt 往abc.txt檔案中寫上內容。

more 檔名 以一頁一頁的方式顯示乙個文字檔案。

cp 複製檔案

mv 移動檔案

rm 檔名 刪除檔案,rm -a 目錄名刪除目錄及子目錄

mkdir 目錄名 建立目錄

rmdir 刪除子目錄,目錄內沒有文件。

chmod 設定檔案或目錄的訪問許可權

grep 在檔案中查詢字串

diff 檔案檔案比較

find 檔案搜尋

date 現在的日期、時間

who 查詢目前和你使用同一臺機器的人以及login時間地點

w 查詢目前上機者的詳細資料

whoami 檢視自己的帳號名稱

groups 檢視某人的group

passwd 更改密碼

history 檢視自己下過的命令

ps 顯示程序狀態

kill 停止某程序

gcc 黑客通常用它來編譯c語言寫的檔案

su 許可權轉換為指定使用者

telnet ip telnet連線對方主機(同win2k),當出現bash$時就說明連線成功。

ftp ftp連線上某伺服器(同win2k)

linux基本命令

linux常用命令 基礎 eg man ls 就可以檢視ls相關的用法 注 按q鍵或者ctrl c退出,在linux下可以使用ctrl c終止當前程式執行。2.ls 檢視目錄或者檔案的屬 列舉出任一目錄下面的檔案 eg ls usr man ls l a.d表示目錄 directory 如果是乙個 ...

LINUX 基本命令

檔案和目錄操作的基本命令 cat clear cmp cut diff du emacs fgrep file grep head ln less more pico pwd sort stat strings tail touch umask uniq vi wc whatis ls ls 選項 ...

Linux基本命令

a boot sequence important linux啟動過程 a.load bios hardware information b.read mbr s config to find out the os mbr master boot record,硬碟第乙個物理扇區,柱面0 磁頭0 扇...