[Linux] step by step learning Linux - unalias command (206)

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/dengjin20104042056/article/details/100196612

00. Contents

01. Command Overview

unalias command to delete command aliases, is a built-in command shell. If you need to cancel any command alias, use the alias command parameter options can be used as instruction. If you use the -a option, then cancel all existing command aliases.

02. Command Format

用法:unalias [-a] 名称 [名称 ...]

03. Common Options

-a	删除所有的别名定义.

04. Reference Example

4.1 Cancellation alias

[deng@localhost ~]$ alias lxx='ls -lh'
[deng@localhost ~]$ lxx
总用量 55M
drwxrwxr-x   7 deng deng   61 1月  22 2019 bak
drwxrwxr-x   8 deng deng   73 3月  28 11:14 bj34
drwxr-xr-x   4 deng deng 4.0K 8月  16 11:10 instantclient_11_2
-rwxrwxr-x   1 deng deng  55M 1月  22 2019 oracle_client_11gR2.tar.gz
drwxrwxr-x   3 deng deng   18 1月  22 2019 oradiag_deng
drwxrwxr-x  10 deng deng  163 9月   1 16:05 projects
-rwxrwxr-x   1 deng deng 2.1K 6月  30 15:14 scott_data.sql
drwxrwxr-x   6 deng deng   50 9月   1 09:38 share
drwxrwxr-x   8 deng deng   73 3月  10 09:16 sz12
-rwxrwxr-x   1 deng deng  599 8月  27 09:56 test.c
-rwxrwxr-x   1 deng deng 1.7K 8月   3 15:05 test.cpp
-rwxrwxr-x   1 deng deng  199 9月   1 19:50 test.sh
-rw-rw-r--   1 deng deng   13 9月   1 19:22 txt
drwxr-xr-x.  2 deng deng    6 11月  8 2018 公共
drwxr-xr-x.  2 deng deng    6 11月  8 2018 模板
drwxr-xr-x.  2 deng deng    6 11月  8 2018 视频
drwxr-xr-x.  2 deng deng    6 11月  8 2018 图片
drwxr-xr-x.  2 deng deng    6 11月  8 2018 文档
drwxr-xr-x.  2 deng deng    6 11月  8 2018 下载
drwxr-xr-x.  2 deng deng    6 11月  8 2018 音乐
drwxr-xr-x.  2 deng deng    6 7月  25 22:10 桌面
[deng@localhost ~]$ unalias lxx
[deng@localhost ~]$ lxx
bash: lxx: 未找到命令...
[deng@localhost ~]$ 

4.2 Delete all aliases

[deng@localhost ~]$ unalias -a
[deng@localhost ~]$ 

05. Appendix

Reference: [Linux] step by step tutorials to learn Linux Summary

Guess you like

Origin blog.csdn.net/dengjin20104042056/article/details/100196612