0
0

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 で sudo コマンドを実行する方法

Posted at

Linux をインストールした直後,sudo コマンドを実行しようとすると,以下の写真のようなエラーが発生します.

image.png

解決策

まずは,su コマンドで rootユーザーにログインします.

su -

image.png

次に,usermod コマンドで,sudo コマンドを実行したいユーザーを sudo グループに追加します.

usermod -G sudo <USERNAME>

image.png

PC を再起動し,もう一度 sudo コマンドを実行すると,問題なく実行できるようになっています.

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?