Try   HackMD

Linux 常用指令

tags: linux

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Linux 常用指令

基本指令

Windows(PowerShell) MacOS / Linux 說明
cd xxx cd xxx 切換目錄到xxx
cd .. cd .. 切換到上層目錄
cd / cd / 切換到根目錄
pwd pwd 取得目前所在的位置
dir ls 皆可 ls 列出目前的檔案列表
md mkdir 皆可 mkdir 建立新的目錄
rd rm -rf 刪除目錄
touch touch 建立檔案
copy cp 複製檔案
move mv 移動檔案(更換檔名)
del rm 刪除檔案
cat cat 觀看文字檔內容
more more 分頁觀看文字檔內容
clear clear 清除畫面上的內容
grep grep 搜尋關鍵字
ipconfig ifconfig 查網路介面

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Linux 常用快捷鍵

ctrl + c - 中斷目前畫面上的操作
ctrl + d - 離開(等同輸入exit+enter)
ctrl + l - 清畫面

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
管線與重定向

  1. |:管線(pipeline) Example: cat /etc/passwd | grep '/home'
syslog:x:104:111::/home/syslog:/usr/sbin/nologin
kevin:x:1000:1000:,,,:/home/kevin:/bin/bash
linebot:x:1001:1001:,,,:/home/linebot:/bin/bash
  1. >,<:重定向(redirection)
echo '123' > a1.txt  //將字串 '123' 導入檔案 a1.txt
cat a1.txt           //觀看 a1.txt
123

Author

  • 林奇賢