小编paw*_*wan的帖子

如何在 Centos 中每次登录时运行 shell 脚本

实际上我想在每次用户登录以及启动时运行我的 shell 脚本。我尝试过使用 crontab,但它仅在启动时运行,而不是每次登录时运行。所以请告诉我如何执行此操作。

#crontab -e
@reboot  /home/user/test.sh
Run Code Online (Sandbox Code Playgroud)

redhat shell bash centos startup-scripts

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

bash ×1

centos ×1

redhat ×1

shell ×1

startup-scripts ×1