Centos系统内置alias别名文件路径
· 技术积累 · Linux alias

alias命令用于设置指令的别名,例如:命令执行、脚本执行

# 查看系统默认内置别名
[root@localhost ~]# alias 
alias cp='cp -i'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias mv='mv -i'
alias rm='rm -i'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'

用户shell配置文件 ~/.bashrc 下只存有3个别名

[root@localhost ~]# cat ~/.bashrc 
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

其他的别名都存在 /etc/profile.d/ 目录下面

[root@localhost ~]# cd /etc/profile.d/
[root@localhost profile.d]# ll
total 64
-rw-r--r--. 1 root root  771 Nov  6  2016 256term.csh
-rw-r--r--. 1 root root  841 Nov  6  2016 256term.sh
-rw-r--r--. 1 root root  196 Apr 29  2015 colorgrep.csh
-rw-r--r--. 1 root root  201 Apr 29  2015 colorgrep.sh
-rw-r--r--. 1 root root 1741 Nov  5  2016 colorls.csh
-rw-r--r--. 1 root root 1606 Nov  5  2016 colorls.sh
-rw-r--r--. 1 root root   92 Jun 10  2014 cvs.csh
-rw-r--r--. 1 root root   78 Jun 10  2014 cvs.sh
-rw-r--r--. 1 root root 1706 Nov  6  2016 lang.csh
-rw-r--r--. 1 root root 2703 Nov  6  2016 lang.sh
-rw-r--r--. 1 root root  123 Jul 31  2015 less.csh
-rw-r--r--. 1 root root  121 Jul 31  2015 less.sh
-rw-r--r--. 1 root root  105 Aug  2  2017 vim.csh
-rw-r--r--. 1 root root  269 Aug  2  2017 vim.sh
-rw-r--r--. 1 root root  164 Jan 28  2014 which2.csh
-rw-r--r--. 1 root root  169 Jan 28  2014 which2.sh

Centos系统内置alias别名文件路径


本文最后更新时间 2024-03-30
文章链接地址:
https://me.jinchuang.org/archives/906.html
本站文章除注明[转载|引用],均为本站原创内容,转载前请注明出处
统计文本中每个字符出现的次数
Nali 离线ip数据库文件
苹果CMS v10内容管理系统搭建
bin/ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information.

Shell终端录制会话与回放会话

Shell中使用变量作为变量名

我要留言