11
export LD_PRELOAD=/usr/lib/libtsocks.so

It's ok that I can export in this way, but how can I make it permanent? I want LD_PRELOAD to still be changed after a reboot. I'm using Ubuntu and Fedora

Michael Mrozek
  • 93,103
  • 40
  • 240
  • 233
LanceBaynes
  • 40,135
  • 97
  • 255
  • 351

2 Answers2

14

Ordinarily, you'd put your "export" line into whatever shell startup file is appropriate: .profile, .bash_profile, .zprofile, whatever, in your $HOME directory.

If you want to make it permanent for every user, the various shells usually have system-wide config files in /etc/: /etc/profile exists on this linux box, but do read the man page to figure out which user-specific and which system-wide file to put it in.

4

Most distributions also have an /etc/profile.d/ directory containing a group of .sh and .csh files. Creating a new file in this directory tends to keep items better organized and keeps /etc/profile from getting cluttered.

i_grok
  • 583