LoginSignup
3
1

【ターミナル】基本コマンド

Posted at

はじめに

ターミナルの基本的なコマンドを一覧にまとめています。

コマンド一覧

ls(list)

ターミナル
ls      #カレントディレクトリにあるファイルやディレクトリの表示 
ls -a   #隠しファイルも含めファイルやディレクトリの全てを表示

cd(change directory)

ターミナル
cd sample   #sampleというディレクトリに移動
cd ~/       #ホームディレクトリに移動
cd ..       #一つ上の階層に移動 

pwd

ターミナル
pwd    #カレントディレクトリの表示

touch

ターミナル
touch ファイル名    #空のファイルを作成 

mkdir(make directory)

ターミナル
mkdir ディレクトリ名  #空のディレクトリを作成 

rm(remove)

ターミナル
rm ファイル名       #ファイルを削除
rm -r sample     #sampleというディレクトリと中身を削除

rmdir

ターミナル
rmdir ディレクトリ名   #空のディレクトリを削除 

cat

ターミナル
cat sample.txt #sample.txtファイルの中身の確認 
3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1