Linked Questions

20 votes
3 answers
21k views

After much frustrating head-brick-wall contact, I've discovered this: $ echo $PATH /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/steve/bin $ sudo bash # echo $PATH /usr/local/...
Steve Bennett's user avatar
0 votes
1 answer
372 views

Admin note: This question is different then why is sudo path different then su because the environmental variables in a bash script ran from cron do not appear to carry over from environmental ...
user3260912's user avatar
0 votes
1 answer
467 views

Specifically, I am using conda command part of Miniconda distribution. It happens that the installer put files in /root/miniconda3/. The problem is that /root/miniconda3/bin is in path, but the ...
Curcuma_'s user avatar
  • 143
219 votes
9 answers
184k views

I have a program that is installed in a custom directory under /opt. To make it easier to run it, I edited my bashrc to add said directory to my path: export PATH=$PATH:/opt/godi/bin:/opt/godi/sbin ...
hugomg's user avatar
  • 6,105
136 votes
8 answers
40k views

I would like to have the root account in safety even if my unprivileged user is compromised. On Ubuntu you can only use sudo for "security reasons" by default. However I am not sure it is any safer ...
stribika's user avatar
  • 5,584
17 votes
4 answers
30k views

When I run sudo, what exactly happens to my environment? When I run sudo command, it doesn't seem to see my or root's environment. For example, my path for both includes /usr/local/bin, but if I try ...
beatgammit's user avatar
  • 7,873
18 votes
2 answers
37k views

Sample command: drush cc all works, but this: sudo drush cc all gives me: sudo: drush: command not found Why? How to fix this?
DevMed's user avatar
  • 313
0 votes
3 answers
3k views

$ which sudo emacs /usr/bin/sudo /home/user1/local_build/bin/emacs $ sudo emacs /etc/apache2/sites-available/000-default.conf sudo: emacs: command not found $ emacs /etc/apache2/sites-available/...
overexchange's user avatar
  • 1,606
1 vote
1 answer
1k views

Working on Ubuntu 16.04.05. According to the official debian and ubuntu documentations, variables declared therein should be inherited by all users; Then how is the following explained: root@pkara-...
pkaramol's user avatar
  • 3,109
0 votes
2 answers
726 views

I'm confused by the following: [user@QVr740-11 ~]$ which ninja /usr/local/bin/ninja [user@QVr740-11 ~]$ sudo which ninja which: no ninja in (/sbin:/bin:/usr/sbin:/usr/bin) [user@QVr740-11 ~]$ sudo ...
Brydon Gibson's user avatar
0 votes
1 answer
364 views

I am trying to use sudo -u postgres to run all postgresql commands inside a container and I'd like to inherit all environment variables before the sudo. I need to sudo in the first place because some ...
tinlyx's user avatar
  • 1,086
2 votes
0 answers
222 views

A fresh installed Ubuntu 24.04 system creates the first user account. That user account has by default the following $PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/...
paladin's user avatar
  • 284