[{"data":1,"prerenderedAt":274},["ShallowReactive",2],{"Categories":3,"NavIndexCategoriesCountFooter":203,"content-\u002F2014\u002F01\u002F28\u002Fsetting-system-path-for-command-line-on-mac-osx\u002F":204},[4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,70,71,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202],{"category":5},"System Administration",{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},"Software Development",{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":27},{"category":27},{"category":67},"Drones & RC",{"category":69},"DIY Projects",{"category":67},{"category":72},"Photography",{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":67},{"category":67},{"category":72},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":5},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":67},{"category":67},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":72},{"category":67},{"category":138},"3D Printing - Laser Cutting - CNC",{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":5},{"category":138},{"category":27},{"category":27},{"category":138},{"category":138},{"category":72},{"category":158},"Photography,3D Printing - Laser Cutting - CNC",{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":67},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":181},"Home Assistant",{"category":181},{"category":72},{"category":27},{"category":27},{"category":72},{"category":138},{"category":5},{"category":72},{"category":72},{"category":138},{"category":27},{"category":181},{"category":181},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},191,{"id":205,"title":206,"body":207,"category":261,"date":262,"description":213,"embedImage":261,"extension":263,"image":261,"intro":261,"meta":264,"navigation":265,"path":266,"seo":267,"series":261,"sitemap":268,"stem":269,"tags":270,"__hash__":273},"content\u002F2014\u002F01\u002F28\u002Fsetting-system-path-for-command-line-on-mac-osx.md","Setting system path for command line on Mac OSX",{"type":208,"value":209,"toc":257},"minimark",[210,214,217,220,233,236,239,248,251,254],[211,212,213],"p",{},"There's plenty of information out there on how to set up the PATH variable for your local shell for OSX - it uses the same method as people are used to on linux - settings in your shell config files.",[211,215,216],{},"But what if you want\u002Fneed to set the paths at the system level? How is that handled?",[211,218,219],{},"Well - to start with - let's take a look in \u002Fetc\u002Fprofile. Here you can see that it's calling \u002Fusr\u002Flibexec\u002Fpath_helper.",[211,221,222,223],{},"More information on that can be found on the ",[224,225,232],"a",{"href":226,"rel":227,"target":231},"https:\u002F\u002Fdeveloper.apple.com\u002Flibrary\u002Fmac\u002Fdocumentation\u002FDarwin\u002FReference\u002FManPages\u002Fman8\u002Fpath_helper.8.html",[228,229,230],"nofollow","noopener","noreferer","_blank","path_helper manpage",[211,234,235],{},"So - paths are being read first from \u002Fetc\u002Fpaths then from any files in \u002Fetc\u002Fpaths.d\u002F",[211,237,238],{},"The files in the \u002Fetc\u002Fpaths.d directory will be read in order based on filename.",[211,240,241,242,247],{},"So - you now have two methods - you can change the default ordering in \u002Fetc\u002Fpaths (and if you wish add paths here) - I use this to move \u002Fusr\u002Flocal\u002Fbin before \u002Fusr\u002Fbin and \u002Fbin - since I have my ",[224,243,246],{"href":244,"rel":245,"target":231},"http:\u002F\u002Fbrew.sh\u002F",[228,229,230],"machomebrew"," files there and some of them overwrite the system files (for example a later version of git). Be aware that this means it's up to you not to install files there that are not backwards compatible - your system also uses a lot of files from \u002Fusr\u002Fbin and \u002Fbin :)",[211,249,250],{},"And if you want to install a set of paths for a given use\u002Fpackage\u002Fapp then you can also choose to add that as a file under \u002Fetc\u002Fpaths.d\u002F",[211,252,253],{},"Note - you'll need to edit these files as the root user - sudo vi \u002Fetc\u002Fpaths for example - and for that to work you'll either need to be an administrator of the machine or added to the \u002Fetc\u002Fsudoers file.",[211,255,256],{},"And finally - you'll need to start a new shell window before seeing the changes.",{"title":258,"searchDepth":259,"depth":259,"links":260},"",2,[],null,"2014-01-28 08:42 +0100","md",{},true,"\u002F2014\u002F01\u002F28\u002Fsetting-system-path-for-command-line-on-mac-osx",{"title":206,"description":213},{"loc":266},"2014\u002F01\u002F28\u002Fsetting-system-path-for-command-line-on-mac-osx",[271,272],"mac","homebrew","wq2RIj5XpPER3u12Xx7vIXiDDDzyfpXEt4vC8IjqbBI",1775293011060]