Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: PATH$ error

  1. #11
    Join Date
    Jun 2006
    Location
    Rockville, MD
    Beans
    29
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: PATH$ error

    Quote Originally Posted by Lars Noodén View Post
    If you close the terminal and open it again, the $PATH should be reset to what is set in ~/.profile or /etc/environment. That is, if you did not change it in ~/.bashrc or ~/.profile. Where did you change it?
    I think this is the answer. Have you checked ~/.bashrc and ~/.profile for any lines that set $PATH? They would start with PATH=... or export PATH=...

    Please do this before you go to the trouble of rebooting into a live CD and doing a lot more complicated stuff (Occam's Razor here, people).

  2. #12
    Join Date
    Apr 2012
    Location
    Missouri, USA
    Beans
    115
    Distro
    Ubuntu

    Re: PATH$ error

    So, do i just enter ~/.bashrc and ~/.profile? The result was: bash: /home/jeremiah/.bashrc: Permission denied

  3. #13
    Join Date
    Jun 2006
    Location
    Rockville, MD
    Beans
    29
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: PATH$ error

    Quote Originally Posted by linux junkie View Post
    So, do i just enter ~/.bashrc and ~/.profile? The result was: bash: /home/jeremiah/.bashrc: Permission denied
    No, you need to edit those files. If you're stuck in a command-line, try using nano, so
    Code:
    nano ~/.bashrc
    Look for a line that changes PATH, and delete it (or at least, fix it).

  4. #14
    Join Date
    Apr 2012
    Location
    Missouri, USA
    Beans
    115
    Distro
    Ubuntu

    Re: PATH$ error

    Command 'nano' is available in the following places
    * /bin/nano
    * /usr/bin/nano
    The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
    nano: command not found
    This was the output.

  5. #15
    Join Date
    Jun 2006
    Location
    Rockville, MD
    Beans
    29
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: PATH$ error

    Well, of course, since you screwed up your $PATH. You'll have to specify the entire path to nano, so
    Code:
    /usr/bin/nano ~/.bashrc

  6. #16
    Join Date
    Apr 2012
    Location
    Missouri, USA
    Beans
    115
    Distro
    Ubuntu

    Re: PATH$ error

    Now what???
    # ~/.bashrc: executed by bash(1) for non-login shells.
    # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
    # for examples

    # If not running interactively, don't do anything
    [ -z "$PS1" ] && return

    # don't put duplicate lines or lines starting with space in the history.
    # See bash(1) for more options
    HISTCONTROL=ignoreboth

    # append to the history file, don't overwrite it
    shopt -s histappend

    # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
    HISTSIZE=1000
    HISTFILESIZE=2000

    # check the window size after each command and, if necessary,
    [ Read 105 lines ]
    ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
    ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell

  7. #17
    Join Date
    Jun 2006
    Location
    Rockville, MD
    Beans
    29
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: PATH$ error

    It's a text editor. Find the lines that mention PATH (read my previous comments), and get rid of them. Use the arrow keys to move around the document, and Backspace to delete.

    Seriously, how hard is it to use a text editor? If you need this much hand-holding to edit a text file, you should probably just reinstall from scratch, and stay completely away from the command line, and not install anything outside of Ubuntu's official repos, until you've learned a lot more.

  8. #18
    Join Date
    Apr 2012
    Location
    Missouri, USA
    Beans
    115
    Distro
    Ubuntu

    Re: PATH$ error

    Thanks man, thanks. Real kind of you. Anyway, i deleted the lines that contained $PATH, so now what? Should all be well? The reason of this forum is for people who don't know how to fix the problem, and need help. As i understand, hand holding isn't a bad thing, thats what this forum is for.
    Thanks again,

  9. #19
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,824
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: PATH$ error

    Let's hope it solved your problem. If the problem is was not in your .bashrc you may have to check .profile. In my case it contains the following PATH related lines:
    Code:
    # set PATH so it includes user's private bin if it exists
    if [ -d "$HOME/bin" ] ; then
        PATH="$HOME/bin:$PATH"
    fi
    which just adds ~/bin to the PATH.

    Else take a look at /etc/profile and /etc/bash.bashrc (no references to PATH in mine) and finally at /etc/environment, containing the default PATH:
    Code:
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    Other files that can influence the PATH aren't present by default (although they can be added).

  10. #20
    Join Date
    Apr 2012
    Location
    Missouri, USA
    Beans
    115
    Distro
    Ubuntu

    Re: PATH$ error

    Thank you!! That got it, and all works now.
    Thanks again for all those who helped!!!

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

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