About 371,000 results
Open links in new tab
  1. What is the difference between ~/.profile and ~/.bash_profile?

    Feb 27, 2019 · The .profile was the original profile configuration for the Bourne shell (a.k.a., sh). bash, being a Bourne compatible shell will read and use it. The .bash_profile on the other …

  2. What do the scripts in /etc/profile.d do? - Unix & Linux Stack …

    @AvindraGoolcharan Different distros may use different schemes for this kind of thing. The profile.d directory only works because its contents are sourced by /etc/profile, which is …

  3. bash - What is the difference between ~/.profile, ~/.bashrc, …

    "profile" is a much less common suffix. Define "scope". Most applications do not share configuration files with other non-related applications. The one possible exception is …

  4. How to permanently set environmental variables

    Feb 28, 2014 · To do if for all users/shells, depending on distro you could use /etc/environment or /etc/profile.Creating a new file in /etc/profile.d may be preferable if it exists, as it will be less …

  5. bash - How to correctly add a path to PATH? - Unix & Linux Stack …

    Feb 21, 2016 · The profile file is read by login shells, so it will only take effect the next time you log in. (Some systems configure terminals to read a login shell; in that case you can start a …

  6. What is the purpose of .bashrc and how does it work?

    May 13, 2014 · Contrast .bash_profile and .profile which are only run at the start of a new login shell. (bash -l) You choose whether a command goes in .bashrc vs .bash_profile depending on …

  7. Setting PATH vs. exporting PATH in ~/.bash_profile [duplicate]

    Any of the ENV files first invoked by a shell such as .bashrc or .profile will set variable values for the life of that shell. So any variables that are set and export ed within those files will maintain …

  8. Where should I source /usr/local/etc/profile from? .bash_profile or ...

    Dec 9, 2021 · /usr/local/etc/profile is not a classic location and would not be sourced. Many distributions have a directory /etc/profile.d, and put code in /etc/profile to source the files in …

  9. path - How do I set a user environment variable? (permanently, …

    May 21, 2015 · Note: If either of these files exists and your login shell is bash, .profile is not read when you log in over ssh or on a text console, but it might still be read instead of .bash_profile …

  10. sudo as another user with their environment

    Jan 2, 2015 · To invoke a login shell using sudo just use -i.When command is not specified you'll get a login shell prompt, otherwise you'll get the output of your command.

Refresh