简体   繁体   中英

Where is the bash_profile in SUSE Linux

I could not find the my bash profile which running automatically after login.

I already checked /home/(username) with ls -a.

I am sure there is bash profile because when i echo $somethings, it response.

Could you help me ?

After /etc/profile , the bash shell (assuming it's either an interactive login shell or run with the --login option) looks for the first file in this set (in your home directory) that exists and is readable:

  • ~/.bash_profile ;
  • ~/.bash_login ; and
  • ~/.profile .

Hence you may not even have a .bash_profile .

The rules are actually very complex, depending on the type of the shell and the various arguments you give to it. If you want to know in detail, have a look in the INVOCATION section of the bash man page.

Check for ~/.bash_profile , ~/.bash_login , ~/.profile or even maybe ~/.bashrc , which isn't a "profile", but might be run after login (see INVOCATION in man bash to understand when and in what order bash reads its startup files). If the file doesn't exist, you can create it.

There're also the system-wide /etc/profile and /etc/bash.bashrc .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM