简体   繁体   English

登录redhat后自动运行脚本

[英]Run a script automatically after logging into redhat

伙计们,我想知道如何在自动登录后启动一个脚本,说hello root提前致谢

以 root 身份登录,如果您使用 bash,请编辑~/.bashrc文件以在文件末尾包含行echo "hello root"

Just put your script inside ~/.bash_profile and it'll be launched after that user logs in.只需将您的脚本放在~/.bash_profile ,它就会在该用户登录后启动。
Check out man bash .查看man bash

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM