Debian在Crontab中使用环境变量
在Shell会话中,可以定义临时生效的环境变量: export MY_TOKEN="" 对于当前用户,可以在.bashrc中定义永久生效的环境变量: nano ~/.bashrc export MY_TOKEN="" source ~/.bashrc 当前用户环境变量配置文件说明: .bashrc:交互式Shell,登录Shell间接加载,非登录Shell直接加载; .bash_profile:登录Shell,如 ssh 远程登录、su - 切换用户加载,优先于.bash_login; .bash_login:登录 Shell 加载,优先使用.bash_profile; .profile:通用登录 Shell 配置,bash/sh 通用,无.bash_profile 时加载。 全局用户环境变量配置文件说明: …

