Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Using sudo su - user -c will make it as though you logged in as that person inheriting their path. That's why su user is different from su - user.

However if you are setting the path in a .bashrc file it will only take effect for interactive sessions (i.e. ssh-ing in as that user).

You should instead use .bash_profile or /etc/profile, see thisthis.

Using sudo su - user -c will make it as though you logged in as that person inheriting their path. That's why su user is different from su - user.

However if you are setting the path in a .bashrc file it will only take effect for interactive sessions (i.e. ssh-ing in as that user).

You should instead use .bash_profile or /etc/profile, see this.

Using sudo su - user -c will make it as though you logged in as that person inheriting their path. That's why su user is different from su - user.

However if you are setting the path in a .bashrc file it will only take effect for interactive sessions (i.e. ssh-ing in as that user).

You should instead use .bash_profile or /etc/profile, see this.

Using sudo su - user -c will make it as though you logged in as that person inheriting their path. That's why su user is different from su - user.

However if you are setting the path in a .bashrc file it will only take effect for interactive sessions (i.e. ssh-ing in as that user).

You should instead use .bash_profile or /etc/profile, see this.

Using sudo su - user -c will make it as though you logged in as that person inheriting their path. That's why su user is different from su - user.

Using sudo su - user -c will make it as though you logged in as that person inheriting their path. That's why su user is different from su - user.

However if you are setting the path in a .bashrc file it will only take effect for interactive sessions (i.e. ssh-ing in as that user).

You should instead use .bash_profile or /etc/profile, see this.

added 6 characters in body
Source Link
Stéphane Gimenez
  • 29.4k
  • 3
  • 79
  • 88

using sudo su - userUsing -csudo su - user -c will make it as though you logged in as that person inheriting their path. That's why su usersu user is different from su - usersu - user.

using sudo su - user -c will make it as though you logged in as that person inheriting their path. That's why su user is different from su - user.

Using sudo su - user -c will make it as though you logged in as that person inheriting their path. That's why su user is different from su - user.

Source Link
Nate
  • 291
  • 1
  • 2
Loading