I had recently messed up my $PATH variable so I thought if fixing it by removing the /etc/paths but I found out online solutions to fix the $PATH variable by just editing the ~/.bash_profile so I moved the /etc/paths to the trash but then I accidentally emptied the trash so now its gone so now should I worry about some critical system apps to stop working if yes how should I fix this?

  • Restore from backup – user151019 Nov 16 '17 at 2:17
  • I have backup of my home directory only. – user244378 Nov 16 '17 at 11:32
  • Then reinstall the OS and set up a proper backup – user151019 Nov 16 '17 at 11:56
  • But I don't think it's neceesary – user244378 Nov 16 '17 at 13:00
  • True but it is the easiest and probably quickest way nowadays. It used to be reinstalling or restores took hours from tape. Now from time machine etc only a few minutes. Probably less time than you have spent on asking the question – user151019 Nov 16 '17 at 13:42

The /etc/paths file is used as an initial value for the PATH variable. It should contain:


Its protection, owner and group should be:

-rw-r--r-- root wheel
  • But it is not necessary right? – user244378 Nov 13 '17 at 7:38
  • /etc/paths is used by /usr/libexec/path_helper ... man path_helper says "default PATH and MANPATH values are obtained from the files /etc/paths and /etc/manpaths respectively". The file should exist so that PATH is set correctly. – creidhne Nov 13 '17 at 7:43
  • Uh creidhne thanks for your reply I have added the paths file and there is a typo in your answer there are two /usr/bin so I replaced one of them as /bin. – user244378 Nov 13 '17 at 8:57

You must log in to answer this question.