简体   繁体   English

如何制作Linux命令的别名

[英]How to make alias of a linux command

/home/ABC/Ladoga / home / ABC / Ladoga

i want to make alias of that line as a Ladoga ** so whenever i type the command **Ladoga ** it will execute the Ladoga command **/home/ABC/Ladoga 我想以Ladoga **作为该行的别名, 所以每当我键入命令** Ladoga **时,它将执行Ladoga命令** / home / ABC / Ladoga

Ladoga is basically a script file Ladoga基本上是一个脚本文件

Goto Your home directory :- cd ~ 转到您的主目录:-cd〜

Edit .bashrc file in this directory :- vi .bashrc 在此目录中编辑.bashrc文件:-vi .bashrc

Add alias command by pressing i :- alias Ladoga='/home/ABC/Ladoga' 通过按i添加别名命令:-alias Ladoga ='/ home / ABC / Ladoga'

Save :- [Esc] :x 保存:-[Esc]:x

Restart Terminal 重启终端

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM