1. 查看 shell
cat /etc/shells
2. 修改默认 shell
chsh -s /bin/sh
3. 添加 shell 命令
- 创建
hello
文件
#!/bin/bash
echo "hello world 2019.10.29"
- 赋予可运行权限
chmod +x hello
- 运行
./hello
cat /etc/shells
chsh -s /bin/sh
hello
文件#!/bin/bash
echo "hello world 2019.10.29"
chmod +x hello
./hello
本文标题:Mac 为 shell 添加函数
本文链接:https://www.haomeiwen.com/subject/wgrwvctx.html
网友评论