10
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ターミナルでルート権限にする

Last updated at Posted at 2018-10-16

コマンド

1.su

su - root

2.sudo

sudo su - root

suとsudoの違い

1.su

①ユーザーがroot(super user)になる。
②root権限は維持される。

※suの後にハイフン(-)をつけるとディレクトリがrootのホームディレクトリに移動するらしい(つけなければディレクトリはそのまま)。

2.sudo 

①コマンドをroot(super user)として実行できる。
②コマンド実行後rootから元のユーザーに戻る。

10
13
2

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
10
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?