• Path

    From DesotoFireflite@DIGDIST/BATTLEST/FREEWAY to All on Sun Jun 14 17:19:00 2015
    Can anyone tell me haow to permantaly store a path statement in Linux. I can get it set, but once I reboot, I loose it. I've tried everything I can find on Google, but nothing is working. I'm a Linus Newby, so explain it so a 5 year old can understand it. Thanks. I want to add the directory so it applies to all users, even root.

    - Don't eat the yellow snow!

    - C.G. Learn
    - Valhalla Home Services! - Telnet://valhalla.synchro.net
    - A Gamers Paradise - Over 100 Registered Online Game Doors!

    ---
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From Nightfox@DIGDIST/BATTLEST/FREEWAY to DesotoFireflite on Mon Jun 15 12:50:00 2015
    Can anyone tell me haow to permantaly store a path statement in Linux. I
    can
    get it set, but once I reboot, I loose it. I've tried everything I can
    find
    on Google, but nothing is working. I'm a Linus Newby, so explain it so a
    5
    year old can understand it. Thanks. I want to add the directory so it applies to all users, even root.

    I hope my explanation is clear enough (let me know if it's not):

    There are a couple of files in each user's home directory, called .bashrc
    and .bash_profile (the leading '.' characters are part of their filename) - Those are read by the Bash shell on startup, and you can put variable assignments, etc. in there. I think the difference is that .bash_profile
    is read before the command prompt opens, and .bashrc is read when you open
    a command prompt (I don't remember exactly).

    In either (or both) of those files, you can modify the path variable. The variable $PATH contains the existing path, and you can reference that in order to prepend or append directories to it, using a set command. For instance, the following would append /sbbs/exec to the path:
    export PATH=$PATH:/sbbs/exec

    Make sure to separate directories with a colon (:).

    Using this method, you would have to edit the .bashrc and .bash_profile
    files for the root user and each other user you want the path to apply to. There's probably a global path setting somewhere, but I'm not sure where
    that is, and it might depend on the Linux distribution you're using.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From DesotoFireflite@DIGDIST/BATTLEST/FREEWAY to Nightfox on Tue Jun 16 04:18:00 2015
    Re: Path
    By: Nightfox to DesotoFireflite on Mon Jun 15 2015 12:50 pm

    export PATH=$PATH:/sbbs/exec

    Thank You. I have been using just "PATH=$PATH:/sbbs/exec" without the export, and as soon as I reboot the system, I loose it. Am I to assume, that by putting "export" in front of this, it will set it permantly?, or do I have to actually go in and use a text editor and modify both of the files you mentioned. Sorry for the stupid questions, but I'm really trying to learn the OS, so I understand it as well as I do windows. Thanks





    - A true friend knows who you are... But likes you anyway.

    - C.G. Learn
    - Valhalla Home Services! - Telnet://valhalla.synchro.net
    - A Gamers Paradise - Over 100 Registered Online Game Doors!

    ---
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From Nightfox@DIGDIST/BATTLEST/FREEWAY to DesotoFireflite on Tue Jun 16 07:42:00 2015
    Re: Path
    By: DesotoFireflite to Nightfox on Tue Jun 16 2015 04:18:19

    export PATH=$PATH:/sbbs/exec

    Thank You. I have been using just "PATH=$PATH:/sbbs/exec" without the export, and as soon as I reboot the system, I loose it. Am I to assume, that by putting "export" in front of this, it will set it permantly?, or do I have to actually go in and use a text editor and modify both of the files you mentioned. Sorry for the stupid questions, but I'm really trying to learn the OS, so I understand it as well as I do windows. Thanks

    You do have to modify those files for it to be permanent. If you just do that in a terminal window, it only applies to that session and would be lost when you exit the terminal or restart the system.

    I had seen 'export' used before but I guess I didn't know exactly what it did. I did a quick search online and found this page: http://how-to.linuxcareer.com/learning-linux-commands-export
    It sounds like you could set an environment variable wihout export, but export makes it apply to child processes (so if you start another instance of the shell within the shell, the variable would apply there too). I imagine the export is probably important for running shell scripts, since a shell script runs in another instance of the shell.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From DesotoFireflite@DIGDIST/BATTLEST/FREEWAY to Nightfox on Tue Jun 16 15:38:00 2015
    Re: Path
    By: Nightfox to DesotoFireflite on Tue Jun 16 2015 07:42 am

    You do have to modify those files for it to be permanent. If you just do that in a terminal window, it only applies to that session and would be lost when you exit the terminal or restart the system.

    I had seen 'export' used before but I guess I didn't know exactly what it did. I did a quick search online and found this page: http://how-to.linuxcareer.com/learning-linux-commands-export

    Maybe it's just me. I went in and tried to edit the files, and now I can't save them. It's so frustrating, I feel like I'm in first grade all over again. I went into the vim editor in terminal, typed i to edit the file, and I was able to type my changes, but then when I typed :e to exit and save, it won't ever save. I tried using other editors, and keep getting permission errors. Honestly, I'm trying to do this on my own with the help of google, and the docs from opensuse, but I'm just over my head. It shouldn't be that hard to perm set the path. I know I'm going to have that ahha moment when it all clicks, and I hope it's soon. LOL.. Thanks for all your help, you know I appreciate it.


    - CAT (n.), Furry keyboard cover.

    - C.G. Learn
    - Valhalla Home Services! - Telnet://valhalla.synchro.net
    - A Gamers Paradise - Over 100 Registered Online Game Doors!

    ---
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From Nightfox@DIGDIST/BATTLEST/FREEWAY to DesotoFireflite on Tue Jun 16 20:14:00 2015
    Re: Path
    By: DesotoFireflite to Nightfox on Tue Jun 16 2015 15:38:13

    You do have to modify those files for it to be permanent. If you
    just do that in a terminal window, it only applies to that session
    and would be lost when you exit the terminal or restart the system.

    I had seen 'export' used before but I guess I didn't know exactly
    what it did. I did a quick search online and found this page:
    http://how-to.linuxcareer.com/learning-linux-commands-export

    Maybe it's just me. I went in and tried to edit the files, and now I can't save them. It's so frustrating, I feel like I'm in first grade all over again. I went into the vim editor in terminal, typed i to edit the file, and I was able to type my changes, but then when I typed :e to exit and save, it won't ever save. I tried using other editors, and keep getting

    What's different in how you're editing the files this time where it won't let you save them? Must be something different in what you're doing..

    Also, I tend to use different commands with vim. I guess there are multiple ways to do anything in Linux. :P When I edit a file, I use the command "vim <filename>" on the command-line (where <filename> is the name of the file to edit). I use i to edit the file. And to exit and save, I use ZZ (two capital Zs). You can also use the command :wq to write & quit.

    Also, when editing root's .bashrc & .bash_profile files, don't forget that you need to edit them as root. You need to either be logged in as the root user or use 'sudo' before your editor command (as in 'sudo vim .bashrc').

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From DesotoFireflite@DIGDIST/BATTLEST/FREEWAY to Nightfox on Wed Jun 17 03:08:00 2015
    Re: Path
    By: Nightfox to DesotoFireflite on Tue Jun 16 2015 08:14 pm

    Also, I tend to use different commands with vim. I guess there are multiple ways to do anything in Linux. :P When I edit a file, I use the command "vim <filename>" on the command-line (where <filename> is the name of the file to edit). I use i to edit the file. And to exit and save, I use ZZ (two capital Zs). You can also use the command :wq to write & quit.

    OK, I'll try that. I was using the command I got off Goggle.

    Also, when editing root's .bashrc & .bash_profile files, don't forget that you need to edit them as root. You need to either be logged in as the root user or use 'sudo' before your editor command (as in 'sudo vim .bashrc').

    That part I understood. I have been logging into root, with a password, but I'll try the sudo command and see if that does better. I use sudo with my mac and have no problems. Thanks, I'll let you know how it goes.


    - Save Water, Shower With A Friend

    - C.G. Learn
    - Valhalla Home Services! - Telnet://valhalla.synchro.net
    - A Gamers Paradise - Over 100 Registered Online Game Doors!

    ---
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From DesotoFireflite@DIGDIST/BATTLEST/FREEWAY to Nightfox on Wed Jun 17 05:57:00 2015
    Re: Path
    By: Nightfox to DesotoFireflite on Tue Jun 16 2015 08:14 pm

    Also, I tend to use different commands with vim. I guess there are multiple ways to do anything in Linux. :P When I edit a file, I use the command "vim <filename>" on the command-line (where <filename> is the name of the file to edit). I use i to edit the file. And to exit and save, I use ZZ (two capital Zs). You can also use the command :wq to write & quit.

    ":wq" worked like a charm, Thanks

    Also, when editing root's .bashrc & .bash_profile files, don't forget that you need to edit them as root. You need to either be logged in as the root user or use 'sudo' before your editor command (as in 'sudo vim .bashrc').

    It's all working now, thank you so much. When editing .bashrc, there was a statement in the file saying not to edit it as it would be changed during updates, so I ended up creating a /etc/profile.local file, and using the "export PATH=$PATH:/usr/bin/g++" to acheve the global path and perserve it. works like a charm. You have no idea how much you have helped, Thanks


    - How long have you been fondling your keyboard like that?

    - C.G. Learn
    - Valhalla Home Services! - Telnet://valhalla.synchro.net
    - A Gamers Paradise - Over 100 Registered Online Game Doors!

    ---
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From Nightfox@DIGDIST/BATTLEST/FREEWAY to DesotoFireflite on Wed Jun 17 13:33:00 2015
    Also, when editing root's .bashrc & .bash_profile files, don't
    forget
    that you need to edit them as root. You need to either be logged
    in
    as the root user or use 'sudo' before your editor command (as in
    'sudo
    vim .bashrc').

    It's all working now, thank you so much. When editing .bashrc, there was
    a
    statement in the file saying not to edit it as it would be changed
    during
    updates, so I ended up creating a /etc/profile.local file, and using the "export PATH=$PATH:/usr/bin/g++" to acheve the global path and perserve
    it.
    works like a charm. You have no idea how much you have helped, Thanks

    Nice that that worked. Odd that a user's .bashrc would have a comment
    saying not to edit it due to updates though - .bashrc in the user's
    directory is meant for the user to edit and make changes to according to their needs.. It doesn't seem right that there would be restrictions for a user not to edit their .bashrc file. Good that you found a solution
    though. It seems like there are several ways to do everything in Linux.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From DesotoFireflite@DIGDIST/BATTLEST/FREEWAY to Nightfox on Wed Jun 17 18:01:00 2015
    Re: Path
    By: Nightfox to DesotoFireflite on Wed Jun 17 2015 01:33 pm

    their needs.. It doesn't seem right that there would be restrictions for a user not to edit their .bashrc file. Good that you found a solution though. It seems like there are several ways to do everything in Linux.

    I'm finding opensuse is different in a lot of ways. LOL There are a lot of things I don't like about it, but there is more that I do like. It seems more stable on this old pent III that I'm learning linux on, than anything else I have tried. Again, thanks.

    - SENILE.COM found...Out of Memory...

    - C.G. Learn
    - Valhalla Home Services! - Telnet://valhalla.synchro.net
    - A Gamers Paradise - Over 100 Registered Online Game Doors!

    ---
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From Nightfox@DIGDIST/BATTLEST/FREEWAY to DesotoFireflite on Wed Jun 17 16:42:00 2015
    their needs.. It doesn't seem right that there would be
    restrictions
    for a user not to edit their .bashrc file. Good that you found a solution though. It seems like there are several ways to do everything in Linux.

    I'm finding opensuse is different in a lot of ways. LOL There are a lot
    of
    things I don't like about it, but there is more that I do like. It seems more stable on this old pent III that I'm learning linux on, than
    anything
    else I have tried. Again, thanks.

    OpenSuse was always one of my favorite Linux distributions. I don't
    remember there being restrictions with .bashrc in OpenSuse. I'm using
    Linux Mint (Cinnamon edition) on my BBS machine right now though (although
    my BBS itself is running in Windows XP in a virtual machine - I recently migrated it over from running in Windows on the actual hardware). Linux
    Mint seems to run fairly well, and I like the Cinnamon GUI environment
    better than the Unity interface currently used by default in Ubuntu and others. Cinnamon is available for other Linux distributions too, which is nice.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From DesotoFireflite@DIGDIST/BATTLEST/FREEWAY to Nightfox on Thu Jun 18 06:36:00 2015
    Re: Path
    By: Nightfox to DesotoFireflite on Wed Jun 17 2015 04:42 pm

    OpenSuse was always one of my favorite Linux distributions. I don't remember there being restrictions with .bashrc in OpenSuse. I'm using Linux Mint (Cinnamon edition) on my BBS machine right now though (although
    my BBS itself is running in Windows XP in a virtual machine - I recently

    Yeah, I like opensuse myself. I tried mint, and I really liked Cinnamon, but unfortunatly with the pent III, it just bogged the system down so much, it was just unusable. When I get comfortable with linux, deff I will switch to the nicer GUI's. I also liked LXLI, as it is super fast with older machines, and it has a nice interface, but all in all, I just decided to stay with OpenSuse, as it found most of my older hardware, and runs pretty stable on this old IBM server and hardware raid.

    I deff like Linux, and getting more comfortable with it everyday. I'm learning by my mistakes, and believe me, I make loads of them LOL, I think i'm gonna change my name to "crash"....

    - The truth will set you free. But first it'll piss you off.

    - C.G. Learn
    - Valhalla Home Services! - Telnet://valhalla.synchro.net
    - A Gamers Paradise - Over 100 Registered Online Game Doors!

    ---
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net
  • From Nightfox@DIGDIST/BATTLEST/FREEWAY to DesotoFireflite on Thu Jun 18 20:46:00 2015
    Re: Path
    By: DesotoFireflite to Nightfox on Thu Jun 18 2015 06:36:55

    Yeah, I like opensuse myself. I tried mint, and I really liked Cinnamon, but unfortunatly with the pent III, it just bogged the system down so much, it was just unusable.

    Funny, I always used to think of Linux as more lightweight than Windows (yet more powerful at the same time). I suppose there are lightweight distributions of Linux out there, and that's the beauty of it - it can be molded into something rather than being a one-size-fits-all solution.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From bcw142@DIGDIST/BATTLEST/FREEWAY to DesotoFireflite on Thu Jul 30 18:01:00 2015
    Re: Path
    By: DesotoFireflite to Nightfox on Tue Jun 16 2015 15:38:13

    Maybe it's just me. I went in and tried to edit the files, and now I can't s them. It's so frustrating, I feel like I'm in first grade all over again. I went into the vim editor in terminal, typed i to edit the file, and I was ab to type my changes, but then when I typed :e to exit and save, it won't ever save. I tried using other editors, and keep getting permission errors. Honestly, I'm trying to do this on my own with the help of google, and the d from opensuse, but I'm just over my head. It shouldn't be that hard to perm the path. I know I'm going to have that ahha moment when it all clicks, and hope it's soon. LOL.. Thanks for all your help, you know I appreciate it.

    Often when saving stuff you have to use su. You mentioned permissions, so that is likely the issue. For example:
    su vi /etc/hosts
    to edit the hosts file and add IPs that are used a lot. It's that root owns the files often times like the old .rc files (startup files).

    ---
    þ Synchronet þ fatcats bbs - fatcatsbbs.com
  • From DesotoFireflite@DIGDIST/BATTLEST/FREEWAY to bcw142 on Thu Jul 30 17:24:00 2015
    Re: Path
    By: bcw142 to DesotoFireflite on Thu Jul 30 2015 06:01 pm

    Often when saving stuff you have to use su. You mentioned permissions, so that is likely the issue. For example:

    Thanks, I'm gradually geting the hang of it. it's fun, but very different.

    C.G. Learn
    Valhalla Home Services! - Telnet://valhalla.synchro.net
    A Gamers Paradise - Over 100 Registered Online Game Doors!

    --- Old farts never die! They just smell that way...
    þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.net