47 linux基本命令

2021-10-12 08:41:32 字數 1047 閱讀 4057

linux基本命令有哪些

linux常用版本有ubuntu, suse, redhat, centos,我們常用centos7,基於centos7常用的命令有:

pwd  列印工作目錄

cd 切換工作目錄

cd .. 到上一級

cd / 到根目錄

cd 回到家目錄:某乙個賬號使用putty等客戶端登入上來以後首先進入的目錄

cd ~ 回到家目錄

cd - 回到上乙個你在的目錄

touch 建立乙個檔案

mkdir 建立乙個資料夾

cp 拷貝檔案

rm 刪除檔案

mv 移動或者重新命名

ls 檢視當前工作目錄下有哪些檔案及資料夾

ll 詳細檢視當前工作目錄下有哪些檔案及資料夾

clear 清屏

history 檢視歷史命令

vim/vi 編輯檔案

cat 列印所有檔案內容

tail -f 檢視末尾

chmod ugo+rwx * 給所有人所有許可權

chmod ugo-rwx * 去掉所有人的所有許可權

chmod u-r * 去掉user的可讀

chmod g+w * 給group可執行許可權

tar -cvf 12.tar /123 壓縮

tar -xvf 12.tar 解壓縮

unzip 解壓縮zip檔案

netstat -luntp|grep 8080 檢視埠8080所在程序

free -m 檢視記憶體大小

df -h 檢視硬碟

ps -aux 檢視程序

kill -9 pid 殺死程序

top 檢視cpu使用

find 查詢檔案

ifconfig 檢視ip

reboot 重啟

halt 關機

systemctl start/stop/restart firewalld 啟動/關閉/重啟 防火牆

linux基本命令

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

《linux基本命令》

博主部落格 斷橋殘雪 uname 顯示版本資訊 同win2k的 ver dir 顯示當前目錄檔案,ls al 顯示包括隱藏檔案 同win2k的 dir pwd 查詢當前所在的目錄位置 cd cd 回到上一層目錄,注意cd 與.之間有空格。cd 返回到根目錄。cat 檔名 檢視檔案內容 cat abc...

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 選項 ...