Announcement

Collapse
No announcement yet.

export proxy settings permanently

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    export proxy settings permanently

    Each time after a reboot I have to do:
    Code:
    export http_proxy="[url]http://myproxy.myplace:80"[/url]
    for apt-get to connect to the outside world. I think this can be permanently set somewhere --- is it in ~/.bashrc or /etc/rc.local ?

    Cheers,
    Isix
    Cheers,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Isix<br />______________________________________<br />&quot;Views and opinions expressed by me are not necessarily true --- they merely remain my views and opinions&quot;<br />______________________________________

    #2
    Re: export proxy settings permanently

    ~/.bashrc is a good place for it

    (Another option would be /etc/bash.bashrc for a system wide setting...but this may get overwritten on bash upgrades, in which case you may need to re-add it)

    Comment


      #3
      Re: export proxy settings permanently = SOLVED

      thank you kubicle, I will do that

      BTW: ... someone also suggested ~/.bash_profile, and it worked. I never understood the difference between ~/.bashrc and ~/.bash_profile. Thanks again.

      Isix
      Cheers,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Isix<br />______________________________________<br />&quot;Views and opinions expressed by me are not necessarily true --- they merely remain my views and opinions&quot;<br />______________________________________

      Comment


        #4
        Re: export proxy settings permanently = SOLVED

        Originally posted by Isix
        I never understood the difference between ~/.bashrc and ~/.bash_profile.
        Can't blame you, it's a bit confusing. ~/.bash_profile (and /etc/profile for system wide) is read by login shells (and is generally only read once when you login), while ~/.bashrc (and /etc/bash.bashrc) is sourced by all interactive shells.

        Some rule of thumbs:
        1. environment variables should (usually) go to bashrc
        2. if you don't know where to put it, put it in bashrc

        Comment


          #5
          Re: export proxy settings permanently

          Pretty cool --- I get the idea --- thanks!

          Isix
          Cheers,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Isix<br />______________________________________<br />&quot;Views and opinions expressed by me are not necessarily true --- they merely remain my views and opinions&quot;<br />______________________________________

          Comment

          Working...
          X