LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-13-2012, 08:36 AM   #1
durgadatta
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Rep: Reputation: Disabled
/bin/sh


I read in an article http://www.pathname.com/fhs/pub/fhs-2.2.pdf (page no.8, two lines before "Begin Rationale") that /bin/sh should be hard or symbolic link to the actual shell we are using if we are not using bash shell. I am using C shell but my /bin/sh is a symbolic link to to bash shell only. I have not experience any trouble so far. Is this any issue?
 
Old 02-13-2012, 10:24 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
It sounds to me like it's exactly how you want it to be. AFAIUI "sh" generally refers to the bourne (POSIX) shell syntax, and the C shell is anything but.

What the reference appears to be saying is that unless you're using a true bourne shell to process /bin/sh scripts, but only a bourne-compatible one like bash, then it should be set up as a link.

Last edited by David the H.; 02-13-2012 at 10:28 AM. Reason: small clarification
 
Old 02-13-2012, 11:01 AM   #3
durgadatta
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by David the H. View Post
It sounds to me like it's exactly how you want it to be. AFAIUI "sh" generally refers to the bourne (POSIX) shell syntax, and the C shell is anything but.

What the reference appears to be saying is that unless you're using a true bourne shell to process /bin/sh scripts, but only a bourne-compatible one like bash, then it should be set up as a link.

I was asking what if i dont use bourne shell and also dont maeke a symbolic link to /bin/sh. Will it cause trouble?
 
Old 02-13-2012, 12:06 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
/bin/sh is often used by system scripts including boot scripts so changing what it points to may cause breakage, especially if you change it to point to a csh shell.
 
  


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
[SOLVED] /usr/bin/xterm: Could not exec /bin/bash: Permission Denied suheng Linux - Newbie 2 09-24-2010 05:31 PM
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
sudo /usr/bin/chroot /home/chroot /bin/su - xxx| /bin/su: user xxx does not exist saavik Linux - General 3 07-04-2007 10:30 AM
Installing .bin-files, leave the file in /usr/local/bin/ ? lagu2653 Linux - Software 1 11-08-2005 08:30 PM
Newbie needs help Installing j2sdk-1_4_2-nb_3_5_1-bin-linux.bin bendoku Linux - Newbie 5 10-11-2003 09:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:10 PM.

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