| 文件 | ~/.bashrc、~/.bash_profile、~/.profile |
|---|---|
| 观察 | mtime、追加片段、alias/function 覆盖 |
核查
核查
ls -l --time-style=long-iso /home/*/.bashrc /root/.bashrc 2>/dev/null
tail -20 /home/alice/.bashrcalias 覆盖(例如把 ls 指向脚本)会改变日常命令行为,需单独列出。
~/.bashrc、~/.bash_profile 与 ~/.profile 在用户登录或开新 shell 时执行,被追加一行命令即可形成与用户绑定的持久化。
| 文件 | ~/.bashrc、~/.bash_profile、~/.profile |
|---|---|
| 观察 | mtime、追加片段、alias/function 覆盖 |
ls -l --time-style=long-iso /home/*/.bashrc /root/.bashrc 2>/dev/null
tail -20 /home/alice/.bashrc