写一个脚本
列如
#!/bin/bash
echo "现在的时间是" ·date +%D·
修改
bash的配置文件: 对所有人有效/etc/profile/etc/bashrc
自己的目录下
.bashrc .bash_profile
如果改了上面的4个配置文件,要让其立即生效,可以使用如下方法source .bash_profile. .bash_profile