Hi..please see the below output
[linux@cent0primary ~]$ cat ~/.bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
# User specific environment and startup programs
There is no output for this below command
[linux@cent0primary ~]$ source ~/.bash_profile
[linux@cent0primary ~]$ echo $?
[linux@cent0primary ~]$ echo $PATH
I added these below two lines before "export PATH" in .bash_profile file in root user's home(/root) directory as well as linux user's home directory.
The path variable has been set to only root user and it is working fine i.e we no need to give full path of command. But for linux user it is not working. everytime I have to export the path manually.
As you told I edited /etc/profile and & added path1 entry as below after HISTSIZE
& also added an entry for path1 in export line as below
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE PATH1 INPUTRC
Although, The path variable is working fine for only root user and not for any other user.
I checked it after 2 reboot also but it is not working apart from root.
Originally Posted by catkin
What is the output from these commands:
BTW, this looks wrong
PATH1=/sbin/:$PATH /usr/sbin/:$PATH /bin/:$PATH /usr/bin/:$PATH
but it does not affect $PATH which is the real problem.