LinuxQuestions.org
Visit Jeremy's Blog.
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, 09: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, 11:24 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,834

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
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 11:28 AM. Reason: small clarification
 
Old 02-13-2012, 12:01 PM   #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, 01:06 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
/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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:31 PM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 09: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 11:30 AM
Installing .bin-files, leave the file in /usr/local/bin/ ? lagu2653 Linux - Software 1 11-08-2005 09:30 PM
Newbie needs help Installing j2sdk-1_4_2-nb_3_5_1-bin-linux.bin bendoku Linux - Newbie 5 10-11-2003 10:27 AM

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

All times are GMT -5. The time now is 02:59 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration