LoginSignup
0
0

More than 1 year has passed since last update.

【Ubuntu(WSL2上)】Linuxコマンド チートシート

Last updated at Posted at 2021-11-01

基本

◆ファイル閲覧

catコマンド

◆cdでディレクトリ移動後、元の「Ubuntuユーザー名@MyComputer:~$」に戻りたい

現在のユーザーのホームディレクトリへの移動
$ cdまたは$ cd ~

◆IPアドレス確認

ip addr show IPv4とIPv6アドレスを表示

◆WSL環境で起動したUbuntuを終了する方法

$ exit

◆一時的に別のユーザに替わる

su

◆sudoコマンドとsuコマンドの違い

コマンド 説明
sudo 他のユーザの権限でプログラムを実行するコマンド。
一般的には root 権限で一度だけプログラムを実行する場合に使用。
su 他のユーザにスイッチする管理系のコマンド。
原則的には「rootのパスワードを知っている」且つ「rootにスイッチすることが許可されている」必要あり。

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