自定义Terminal登录欢迎界面

废话不多说,先给个效果图。

这里基本原理就是在每次打开终端的时候,都先去执行一条命令来打印欢迎信息。这里使用的是parrotsay这个命令。

一、安装parrotsay

npm install --global parrotsay

parrotsay hello world # 测试是否安装成功

二、设置启动终端自动执行该命令

这里假设你使用的是oh-my-zsh

进入~/.oh-my-zsh/custom。新建一个名为hello.zsh的文件。里面的内容为:

parrotsay "你想看到的内容"

保存然后重启终端,应该就能看到效果了。

Author: LeoB_O
Link: https://leob-o.github.io/2019/01/18/自定义Terminal登录欢迎界面/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.