8
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Linux 基本コマンドまとめ

Posted at

はじめに

新卒のSE歴1か月がLinuxコマンドをまとめる(自分用)

以下のようにまとめてある。

コマンド:コマンドの説明

(コマンドの由来)

コマンド使用例

基本的なコマンド(常用コマンド)

cd:ディレクトリ移動

(chenge directory)

cd ファイル名

ls:ディレクトリの内容をリスト形式で表示

(list)

ls ディレクトリ名

mv:ファイルを移動

(move)

mv 移動元ファイル名 移動先ファイル名

cp:ファイルやフォルダをコピー

(cope)

cp 移動元 移動先

mkdir:ディレクトリの作成

(make directory)

mkdir ディレクトリ名

touch:ファイルの作成

touch ファイル名

rmdir:空のディレクトリの削除

(remove dirctory)

rmdir ディレクトリ名

rm:ファイルやディレクトリを削除

(remove)

rm 名

pwd:現在いる位置の表示

(print working directory)

pwd

find:ファイルの検索

find -neme ファイル名

cat:ファイルの内容を表示

(concatenate)

cat ファイル名

grep:指定した文字列がテキスト内に存在した場合その行を抽出する

(Global Regular Expression Print)

grep "検索したい文字" ファイル名

chmod:ファイルやフォルダのアクセス権の変更

(change mode)

chmod 755 ファイル名

chmodの詳しい使い方は以下のURLを参照↓
Linuxの権限確認と変更(chmod)


chown:ファイルやフォルダのオーナーやグループの変更

(change owner)

chown 変更後のユーザ名 ファイル名

man:コマンドのマニュアルを表示

(manual)

man 調べたいコマンド



ユーザ管理

useradd:ユーザの新規作成
userdel:ユーザの削除
groupadd:グループの新規作成
groupdel:グループの削除

便利なショートカット

ショートカット 内容
↓↑ コマンド履歴を順番に表示
tab フォルダやファイル名の予測変換
Ctr+a カーソルを先頭に移動
Ctr+e カーソルを最後尾に移動
Ctr+d カーソルの位置の文字を削除
Ctr+w カーソルの左側の単語を削除
Ctr+r コマンド履歴の中から検索

以上

8
3
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
8
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?