How to programmatically set a permanent environment variable in Linux?

前端 未结 3 760
情歌与酒
情歌与酒 2020-12-29 11:17

I am writing a little install script for some software. All it does is unpack a target tar, and then i want to permanently set some environment variables - principally the l

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-29 11:55

    You can also generate and install a script that sets those variables. Users of your package then source that script or copy its contents to their own shell init file.

提交回复
热议问题