Results 1 to 12 of 12
  1. #1
    germpest
    Guest
    terminal is messed up
    I am trying to learn the terminal and for some reason basic commands don't work. I am trying "ls" and it says bash: ls :command not found. Although yesterday this was working fine. Is there a way to reinstall the terminal?

  2. #2
    terminal is messed up
    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Nederland, Texas
    Posts
    4,072
    Specs:
    13in macbook - 10.10.4
    It's not the terminal, it's your path, or lack thereof. What do you get when you type:
    echo $PATH
    Craig Domingue
    (\__/)
    (='.'=) This is Bunny. Copy and paste Bunny into your
    (")_(") signature to help him gain world domination

  3. #3
    germpest
    Guest
    Quote Originally Posted by cradom
    It's not the terminal, it's your path, or lack thereof. What do you get when you type:
    echo $PATH
    /opt/local/bin:/opt/local/sbin:{ PATH} :/usr/local/bin

  4. #4
    terminal is messed up
    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Nederland, Texas
    Posts
    4,072
    Specs:
    13in macbook - 10.10.4
    Hmmm...looks like something is messed up. Check your .bashrc or .bash_profile file for syntax errors. Probably where it says { PATH}. Should look like this: ${PATH}.
    Craig Domingue
    (\__/)
    (='.'=) This is Bunny. Copy and paste Bunny into your
    (")_(") signature to help him gain world domination

  5. #5
    germpest
    Guest
    Quote Originally Posted by cradom
    Hmmm...looks like something is messed up. Check your .bashrc or .bash_profile file for syntax errors. Probably where it says { PATH}. Should look like this: ${PATH}.
    where is that located? /etc/? I can't even su to root.

  6. #6
    terminal is messed up
    rman's Avatar
    Member Since
    Dec 24, 2002
    Location
    Los Angeles, California
    Posts
    12,584
    Specs:
    2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi
    Cool
    In your home directory/folder.
    Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!

  7. #7
    terminal is messed up
    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Nederland, Texas
    Posts
    4,072
    Specs:
    13in macbook - 10.10.4
    What rman said. You can open a terminal and type:
    /bin/ls -a
    to see if it's there. If you're not familiar with the pico editor or vi, you can open it and edit it with Textwrangler (free) from the Finder. Use the 'open hidden' menu item.

    From what your $PATH shows, you might have DarwinPorts installed? Normally there is no /opt directory in OS X, and nothing in /usr/local/bin.
    Craig Domingue
    (\__/)
    (='.'=) This is Bunny. Copy and paste Bunny into your
    (")_(") signature to help him gain world domination

  8. #8
    germpest
    Guest
    Quote Originally Posted by cradom
    What rman said. You can open a terminal and type:
    /bin/ls -a
    to see if it's there. If you're not familiar with the pico editor or vi, you can open it and edit it with Textwrangler (free) from the Finder. Use the 'open hidden' menu item.

    From what your $PATH shows, you might have DarwinPorts installed? Normally there is no /opt directory in OS X, and nothing in /usr/local/bin.
    It's funny, all this trouble started when I was trying to install blackbox window manager. Something told me to install DarwinPorts and I didn't do that right. Then something else told me to change my bash_profile file and add a line to it. I screwed up the line...

    Anyways, bash_profile isn't under my home directory.

    "Edit either /etc/profile or ~/.bash_profile and add the following line at the end. You will need to re-login for the changes to take effect."

    this is what I tried to follow.

  9. #9
    germpest
    Guest
    thanks
    I finally figured it out
    it was etc/profile, and I had $P{PATH} instead of ${PATH}

    thanks for all your help. this was a bit frustrating.

  10. #10
    terminal is messed up
    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Nederland, Texas
    Posts
    4,072
    Specs:
    13in macbook - 10.10.4
    Actually, it's not a good idea to edit etc/profile because whatever is changed there will be global. It will affect all users on the machine, not just your account. If you screw up and create a new user to find the problem, you will have the same problem in the new user.

    It's better to copy the file to your home folder or create a new one in your home folder so it just affects your account.
    Craig Domingue
    (\__/)
    (='.'=) This is Bunny. Copy and paste Bunny into your
    (")_(") signature to help him gain world domination

  11. #11
    terminal is messed up
    rman's Avatar
    Member Since
    Dec 24, 2002
    Location
    Los Angeles, California
    Posts
    12,584
    Specs:
    2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi
    Cool
    Like cradom suggested it is better to make change to you personal copy and not the system copy.
    Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!

  12. #12
    Logan
    Guest
    Sort of off topic but I wanted to mention anyways, iTerm is a handy free download for those of you who want a little bit more out of your Terminal.

    and for no particular reason: I love pico. vi makes me cry.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Month in Terminal is in Russian - only in Terminal!
    By yoandrew in forum OS X - Operating System
    Replies: 4
    Last Post: 12-29-2012, 09:20 AM
  2. Messed Up Terminal Bash Please Help!
    By RJDavis in forum OS X - Operating System
    Replies: 1
    Last Post: 10-26-2010, 03:51 PM
  3. Airdisk Messed up by Terminal!
    By The Vindicat3d in forum OS X - Operating System
    Replies: 0
    Last Post: 03-21-2008, 04:14 PM
  4. Can You Help? I've Messed Up Terminal.app Login
    By mac57 in forum OS X - Development and Darwin
    Replies: 2
    Last Post: 06-15-2006, 07:27 PM
  5. My Terminal is messed up.
    By edokid in forum Switcher Hangout
    Replies: 8
    Last Post: 11-16-2004, 02:42 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
  •