实际上我想在每次用户登录以及启动时运行我的 shell 脚本。我尝试过使用 crontab,但它仅在启动时运行,而不是每次登录时运行。所以请告诉我如何执行此操作。
#crontab -e @reboot /home/user/test.sh
redhat shell bash centos startup-scripts
bash ×1
centos ×1
redhat ×1
shell ×1
startup-scripts ×1