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 %
まとめ
今回の記事は万が一忘れてしまった時の備忘録です