LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 10-30-2016, 06:47 PM   #1
kirushna
LQ Newbie
 
Registered: Oct 2016
Location: India
Posts: 2

Rep: Reputation: Disabled
For new users which command for executables shows as /bin instead of /usr/bin


Hi all,

I am using RHEL7. After creating 2 users which commands shows as /bin instead of /usr/bin. for 1 user it is /bin and another user it shows as /usr/bin, why?

From user1 - which command shows as /usr/bin
From user2 - which command shows as /bin

example,one of the executable gcc, $which gcc give the output as follows,
User1 - /usr/bin/gcc
user2 - /bin/gcc

How to make user2 to get executables for which commands from /usr/bin?

Kindly share your inputs.

Last edited by kirushna; 10-30-2016 at 07:57 PM.
 
Old 10-30-2016, 08:08 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
In RHEL 7, /bin is just a symlink to /usr/bin, so it doesn't really matter which one is in the PATH variable.
 
Old 10-30-2016, 08:18 PM   #3
kirushna
LQ Newbie
 
Registered: Oct 2016
Location: India
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for the reply.

Yes, I accept that but for us this is one of the pre-requirement for a installing an application.

We are facing an issue with application and pointer to the issue is mentioned as need to change from /bin to /usr/bin for that user.

How to do that?

We created both users using, useradd <username>
 
Old 10-30-2016, 11:43 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
You can set any PATH you want in each user's ~/.bash_profile. Since you presumably have not done that, I have no idea why different users would be getting a different PATH. What does "echo $PATH" return for each of those users?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
echo $PATH shows /usr/kerberos/bin:$PATH:$home/bin klcrowder1 Linux - Server 2 03-14-2013 06:14 AM
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or director irlogo Red Hat 5 03-12-2012 04:38 AM
Error: Cannot find 'ssh-keygen' in '/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin' venu.navat Linux - Software 3 03-08-2012 04:00 AM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM
Failed to chck remot comnd executin using shells /usr/bin/ssh and /usr/bin/rsh farnaw4u Linux - Software 2 04-06-2009 12:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration