Results 1 to 5 of 5
  1. #1

    Member Since
    Apr 20, 2011
    How to edit PATH variable outside of terminal
    I'm wondering if there's any possible way to edit my PATH variable outside of terminal. I sorta messed around with /usr/bin, and now I can't copy or move the backups I made of it back in to replace them, since it can't run the correct commands.

  2. #2

    Member Since
    Dec 11, 2010
    I think you need to reinstall OS X - who knows what else you've messed up?

    You can edit ~/.profile to set up the PATH variable.

  3. #3

    Discerptor's Avatar
    Member Since
    Aug 02, 2005
    2.6GHz Core i7 15" MacBook Pro - 8GB DDR3 SDRAM - 750GB 7200 RPM HDD - GeForce 650M GT 1GB VRAM
    You should still be able to move the backups you made back in using Finder, even if you've messed up your command line tools. Remember that you can use Go -> Go To Folder... in Finder to go to any folder on your system, even if it's hidden. All that said, if you're going to mess around with putting your own command line commands in OS X, in the future, you should just make some other directory for them and add it to your PATH. I normally just laugh at people who've messed up in the way you claim to have.

  4. #4

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    2012 13" MBP (2.5 i5, 8GB)
    You may not need to reinstall anything - it's very possible we can fix this.

    You can still run commands - you'll just need to use the full path to the binaries. For instance, instead of running "cp", run "/bin/cp". You can find binaries by executing "/usr/bin/whereis <name of bin>". For instance, you can execute "/usr/bin/whereis mv" and it will print back the location of mv.

    Now that you have the full path of apps, execute the commands you need. And as a tip for the future (and something you're probably well aware of now) - don't mess around with parts of the filesystem that you shouldn't be modifying.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  5. #5

    Member Since
    Apr 20, 2011
    Thanks all . Sorta learned my lesson there. Also I found that under /etc you can modify paths.d as a text file. Problem was, I wasn't logged in as root, so I couldn't modify them, and once I shut down the computer, it wouldn't reboot, so I had to reinstall it. And that's why you don't mess with /bin files....

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. path environment variable
    By blackwaterdev in forum Switcher Hangout
    Replies: 5
    Last Post: 04-04-2013, 04:06 AM
  2. Problems setting PATH variable in Lion
    By jon232 in forum OS X - Operating System
    Replies: 2
    Last Post: 10-28-2011, 12:52 AM
  3. Show path at the tab title and the cmdline prompt in mac terminal
    By ypsd in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 07-25-2011, 04:55 PM
  4. edit XML file using variable in shell script.
    By jc6 in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 10-23-2010, 06:36 PM
  5. Changing PATH variable
    By burnt1ce85 in forum OS X - Development and Darwin
    Replies: 3
    Last Post: 06-08-2008, 03:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts