Post

Update sudo path

  1. The sudo command uses a restricted PATH for security reasons. To include your directory in the PATH when running sudo, you can edit the /etc/sudoers file.
1
sudo visudo

Add the following line to the file:

1
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/path/to/your/directory"
  1. Add the directory to the PATH
This post is licensed under CC BY 4.0 by the author.