y   小y笔记

==============  我的Linux学习笔记  ==============
主页     Linux常用命令     Linux系统管理     Linux网络管理     shell script    

Linux网络相关命令     Linux文件管理相关命令     Linux用户及用户组管理命令
Linux系统管理命令     Linux磁盘管理命令


1.alias scpzfl='sh /home/user/abc.sh'
2.alias sshzfl='sh /home/user/abc.sh'
alias 新的命令=‘原命令 -选项/参数’
例:unalias sshzfl
alias -p 查看系统已经设置的别名

Aliases are recongnized only by the shell in which they are created,and they apply only for the user that creates them,unless that user is the root user,which can create aliases for any user.

In the case of Red Hat Linux,an alias for any user can be added to the ".bashrc"file in that user's home directory.Because this file is read at login,the change will not take effect until the user has logged in again.
Aliases for the root user can be made permanent by entering them in the .bashrc file in the root's home directory,i.e.,in /root/.bashrc.System-wide aliases can be put in the /etc/bashrc file. The system needs to be restarted before system-wide aliases can take effect.