{"id":602,"date":"2006-07-21T02:21:58","date_gmt":"2006-07-21T09:21:58","guid":{"rendered":"http:\/\/www.laptopsolaris.com\/?p=15"},"modified":"2006-07-21T02:21:58","modified_gmt":"2006-07-21T09:21:58","slug":"using-bash-by-default","status":"publish","type":"post","link":"https:\/\/planet.mcb.guru\/?p=602","title":{"rendered":"Using bash by default"},"content":{"rendered":"<p>I much prefer to use bash as my main shell, but in Solaris, you are much better off using the default shell, particularly for root, just in case there is a problem and you cannot mount the \/usr directory during a boot. <\/p>\n<p>OK, it may not happen often (and in fact, the default install is now to have only one partition for the Solaris OS, one for user files and swap), but I figure it is best to err on the side of caution.<\/p>\n<p>The best way to do this is to configure your .profile to exec \/usr\/bin\/bash if it is available, but do nothing otherwise, like this: <\/p>\n<blockquote><pre>if [ -x \/usr\/bin\/bash ]\nthen\n    exec \/usr\/bin\/bash\nfi<\/pre>\n<\/blockquote>\n<p>Using exec means that the Bourne shell (sh) will be replaced by bash, so when you logout, you don&#8217;t have to logout from two shells. <\/p>\n<p>Obviously you can continue to put whatever you like into the standard .profile according to your needs, while using the .bash* init scripts to do your custom bash operations.\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a very quick tip on to use bash by default without affecting your ability to use the fallback shell in an emergency. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[31],"_links":{"self":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts\/602"}],"collection":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=602"}],"version-history":[{"count":0,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts\/602\/revisions"}],"wp:attachment":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}