Results 1 to 8 of 8

Thread: Please explain how $PATH works

  1. #1
    Just burned his ISO
    Join Date
    May 2008
    Posts
    7

    Default Please explain how $PATH works

    I was wondering why some programs weren't loading (particularly a game of nethack). So, when I tried the nethack command it said nethack is available in /usr/games but it's not in the path, so, i did a quick look up of the $PATH variable, and i got this:

    /opt/kde3/bin:/opt/kde3/games:/usr/local/sbin:/usr/local/bin:/opt/kde3/sbin:/usr/sbin:/opt/kde3/bin:/usr/bin:/sbin:/bin:/opt/oracle/instantclient_10_2:/opt/cuda/bin: No such file or directory

    What is the PATH var supposed to be? this is also affecting my laptop (i'm using BT4 on my desktop as well), and it seems that there may be other files missing. It was working before, but it seems to be just working odd now.

  2. #2
    Developer
    Join Date
    Mar 2007
    Posts
    6,124

    Default Re: Please explain how $PATH works

    This is a perfect example of the most basic linux. This is the kind of thing that one should know before even attempting to use backtrack.

    http://en.wikipedia.org/wiki/PATH_(variable)

  3. #3
    Just burned his ISO
    Join Date
    May 2008
    Posts
    7

    Default Re: Please explain how $PATH works

    No no, I know how $PATH works, and how to append to it (export) but i was wondering what the default BT4 PATH should be, not what the PATH variable is in general, since I get a "No such file or directory" error on my laptop as well, which would lead me to believe that either something is missing when nethack was installed (since a few tools are now missing), or there is a bug in the repo that breaks the path.

  4. #4
    Developer
    Join Date
    Mar 2007
    Posts
    6,124

    Default Re: Please explain how $PATH works

    I will also answer you here as well as in PM. Correct me if I am wrong but the title of your thread says "Please explain how $PATH works" which I did by giving you a link with a good explanation. Now you say thats not what you meant at all. Since I am not familiar with nethack I am not certain as to how it is supposed to behave, however, if its in /usr/games when I look at your $path variable you posted /usr/games is clearly not there so of course its not going to work.

    If you can provide some more explanation here in this thread I will attempt to help you more but you are being rather unclear as to what you want to know.

  5. #5
    Just burned his ISO
    Join Date
    May 2008
    Posts
    7

    Default Re: Please explain how $PATH works

    After rereading my OP, I realize that it was more than vague as to what i was trying to convey (yay 12 hour shifts), So, let me try from the beginning.

    I installed BT4 final off a flash drive, rebooted, did the usual update through synaptic, installed all the new tools added to the backtrack Repos, and installed some diversions for when I needed a break. At this point, I was able to play a game of nethack (which, to me is always one of the first tasks on a new install, I'm weird like that.) now, at this point, I use the update all of fasttrack script, installed the cuda compatable video driver, and added in airdrop-NG, and proceded to customize my shiny new backtrack install.

    Somewhere along the line, something broke in the system, and a good part of my PATH disappeared which I noticed by trying to play another game of nethack, and had that lovely error thrown up that it knows the program is installed and where it's located, but it's not in the path so it cant run it. which to me is kind of a redundant error message really.

    Adding an export to add something to my PATH is trivial, but the reason why I posted it in the first place was more to figure out 1. what broke, 2. why, and 3. how to fix it. the first step to me was to see if there was anything missing from my path, so I booted up my laptop as well (which BT4 works awesome on the eeepc 1000h, just wanted to put that out there) and tried to check the path, and got the same sort of error message, where part of the PATH had been corrupted or deleted, or something. so part of my original question was, what is the default PATH for BT4 final.


    My guess would be that something was installed that had a slight bug in the install script, and tried to add itself in, but it added a wrong directory to the path.

    My path, for completeness is:
    /opt/kde3/bin:/opt/kde3/games:/usr/local/sbin:/usr/local/bin:/opt/kde3/sbin:/usr/sbin:/opt/kde3/bin:/usr/bin:/sbin:/bin:/opt/oracle/instantclient_10_2:/opt/cuda/bin: No such file or directory

  6. #6
    Member whitelisted's Avatar
    Join Date
    Feb 2010
    Posts
    72

    Default Re: Please explain how $PATH works

    You should probably also be aware that BT is a specialist distro aimed at pentesting - it wasn't engineered with any thought towards helping you play games or surf pr0n. If you want to do that, then perhaps a general purpose desktop distro like Ubuntu (or perhaps Fedora, if you don't understand how to tweak your PATH) might be a better option for you.

    If you've decided to customize your install of BT to include some games to amuse yourself with while you wait for a test to run or something, then that's cool, but it sounds to me like you've only done half the job (you installed the app, but you didn't tweak your $PATH to support it) and then you've complained that BT doesn't support your specific needs (which are unrelated to pentesting) out the box.

  7. #7
    Developer
    Join Date
    Mar 2007
    Posts
    6,124

    Default Re: Please explain how $PATH works

    The cuda tools add path variables but they work fine for every one else.

  8. #8
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default Re: Please explain how $PATH works

    OP it would be really hard for us to tell (since as you stated above you have added several different apps) what program (if any) caused this error.
    If you can't mess with your own $PATH then it might not be a good idea to do so. Otherwise if you do then just fix it and the problem should be resolved, otherwise it is not a $PATH problem.

Similar Threads

  1. Can Somone please explain Nessus to me?
    By skull2006 in forum Beginners Forum
    Replies: 1
    Last Post: 02-24-2010, 03:56 PM
  2. Explain code for this
    By lawest12 in forum OLD Newbie Area
    Replies: 1
    Last Post: 10-21-2008, 04:18 AM
  3. WEP: no data packets, please explain
    By ritalinkid in forum OLD Newbie Area
    Replies: 14
    Last Post: 08-11-2007, 07:46 PM
  4. Explain this please
    By purehate in forum OLD Newbie Area
    Replies: 5
    Last Post: 08-05-2007, 09:34 AM
  5. ath0 dmesg, please explain
    By snakedriver in forum OLD Wireless
    Replies: 0
    Last Post: 03-30-2007, 08:41 PM

Posting Permissions

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