{"id":995,"date":"2012-08-11T16:11:48","date_gmt":"2012-08-12T00:11:48","guid":{"rendered":"http:\/\/www.wiredatom.com\/blog\/?p=995"},"modified":"2013-01-13T16:05:33","modified_gmt":"2013-01-14T00:05:33","slug":"lives-of-bashrc-bash_profile-profile-and-beyond","status":"publish","type":"post","link":"https:\/\/www.wiredatom.com\/blog\/2012\/08\/11\/lives-of-bashrc-bash_profile-profile-and-beyond\/","title":{"rendered":"Lives of .bashrc, .bash_profile, .profile, and Beyond"},"content":{"rendered":"<p>Before reading <a href=\"http:\/\/stefaanlippens.net\/bashrc_and_others\">this article<\/a> on the differences, I&#8217;d been stuffing all my <code class=\"codecolorer bash default\"><span class=\"bash\"><span class=\"kw3\">export<\/span><\/span><\/code>, <code class=\"codecolorer bash default\"><span class=\"bash\"><span class=\"kw3\">alias<\/span><\/span><\/code> and other things in either <code class=\"codecolorer bash default\"><span class=\"bash\">.bash_profile<\/span><\/code> or <code class=\"codecolorer bash default\"><span class=\"bash\">.profile<\/span><\/code> files on my Macs.<\/p>\n<p>Though most settings will run just fine in either file, there is an important difference between <code class=\"codecolorer bash default\"><span class=\"bash\">.bash_profile<\/span><\/code> and <code class=\"codecolorer bash default\"><span class=\"bash\">.profile<\/span><\/code>:<\/p>\n<p>If you need something to be executed or <code class=\"codecolorer bash default\"><span class=\"bash\">sourced<\/span><\/code> (i.e. <code class=\"codecolorer bash default\"><span class=\"bash\"><span class=\"kw3\">source<\/span> ~<span class=\"sy0\">\/<\/span>.profile<\/span><\/code>) as you open a new terminal tab or terminal window, stick it inside of <code class=\"codecolorer bash default\"><span class=\"bash\">.bash_profile<\/span><\/code>. Items in <code class=\"codecolorer bash default\"><span class=\"bash\">.profile<\/span><\/code> only get run once when you login.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before reading this article on the differences, I&#8217;d been stuffing all my export, alias and other things in either .bash_profile or .profile files on my Macs. Though most settings will run just fine in either file, there is an important difference between .bash_profile and .profile: If you need something to be executed or sourced (i.e. &hellip; <a href=\"https:\/\/www.wiredatom.com\/blog\/2012\/08\/11\/lives-of-bashrc-bash_profile-profile-and-beyond\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Lives of .bashrc, .bash_profile, .profile, and Beyond&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[10,3],"tags":[],"class_list":["post-995","post","type-post","status-publish","format-standard","hentry","category-geek-stuff","category-mac-osx"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p54IqZ-g3","_links":{"self":[{"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/posts\/995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/comments?post=995"}],"version-history":[{"count":1,"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/posts\/995\/revisions"}],"predecessor-version":[{"id":1006,"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/posts\/995\/revisions\/1006"}],"wp:attachment":[{"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/media?parent=995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/categories?post=995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wiredatom.com\/blog\/wp-json\/wp\/v2\/tags?post=995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}