alias的用法

alias的用法


系统中已经设定的别名:
1.alias scpzfl='sh /home/user/abc.sh'
2.alias sshzfl='sh /home/user/abc.sh'
--------------------------------------------------------------------
alias使用方法:
alias 新的命令=‘原命令 -选项/参数’
unalias:删除一个别名
例:unalias sshzfl
alias -p 查看系统已经设置的别名

alias命令的作用只局限于该次登入的操作。若要每次登入都能够使用这些命令别名,则可将相应的alias命令存放到bash的初始化文件/etc/bashrc中。
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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

lssyg2011

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值