本文主要是介绍用alias给Mac OS 添加 ll命令,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
用alias给Mac OS 添加 ll命令
用法:
alias 命令别名=“命令行”
示例:
alias ll=“ls -l”
列出所有别名:
alias 或者 alias -p
应用到所有用户
在/etc/profile中添加alias命令
cat /etc/profile
# System-wide .profile for sh(1)if [ -x /usr/libexec/path_helper ]; theneval `/usr/libexec/path_helper -s`
fiif [ "${BASH-no}" != "no" ]; then[ -r /etc/bashrc ] && . /etc/bashrc
fialias ll='ls -l'
alias la='ls -a'
alias grep='grep --color'
alias find='find --color
使配置文件生效:
source /etc/profile
这篇关于用alias给Mac OS 添加 ll命令的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!