LoginSignup
0
0

More than 3 years have passed since last update.

Linux 基本コマンド 備忘録

Last updated at Posted at 2021-01-09

Linuxとは

MacOSやWindowsと同じOS
OSはコンピュータのハードウェアを管理しているソフトウェアのことです

基本コマンド

ls

カレントディレクトリ直下のファイルを確認

terminal.
% ls  //直下のファイル確認
Applications        Pictures
Desktop             Public
~%

pwd

カレントディレクトリ確認

terminal.
Desktop % pwd  //現在のディレクトリ確認
/Users/Desktop
Desktop %

mkdir

ディレクトリ作成

terminal.
Desktop % mkdir sample  //sampleディレクトリ作成
Desktop %

cd

ディレクトリの移動

terminal.
Desktop % cd sample  //sampleディレクトリへ移動
sample %

touch

空のファイル作成

terminal.
sample % touth sample.html  //空のファイル作成
sample %

mv

名前の変更

terminal.
sample % mv smaple.html sample2.html  //変更
 sample % ls  //直下のディレクトリ確認
 sample2.html
sample %

rm

ファイル・ディレクトリの削除

terminal.
sample % rm -r sample2.html  //削除
ample % ls  //直下のディレクトリ確認

sample % 

history

過去のコマンドの記録

terminal.
sample % history  //履歴の確認
 1010  ls
 1011  cd sample.thml
 1012  cd sample.html
 1013  echo sample.html
 1014  echo "Hello world > sample.html\na\n
sample %

まとめ

今回の記事は万が一忘れてしまった時の備忘録です

0
0
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
0
0