unalias 命令的功能是取消已定义的别名。
用法
unalias [-a] name [name ...]
选项
-a 取消所有别名。
使用示例:
[root@server dir]# alias la='ls -al'
[root@server dir]# la
总用量 40
drwxr-xr-x 5 root test 4096 12月 28 10:37 .
dr-xr-x---. 9 root root 4096 12月 26 11:22 ..
-rwxr-xr-x 2 root test 363 12月 2 16:36 a
-rwxr-xr-x 1 root root 728 12月 18 17:03 b
-rw-r--r-- 1 root root 5 12月 18 17:03 c
lrwxrwxrwx 2 root test 4 12月 2 13:54 dir1 -> dir2
drwxr-xr-x 2 root test 4096 12月 2 14:08 dir2
drwxr-xr-x 3 root test 4096 12月 1 16:11 dir3
lrwxrwxrwx 2 root test 4 12月 2 13:54 dir4 -> dir2
-rwxr-xr-x 1 root test 136 12月 22 14:35 file2
-rwxr-xr-x 1 root test 0 11月 28 15:12 file3
-rwxr-xr-x 1 root test 0 11月 29 14:41 file4
-rw-r--r-- 1 root root 0 12月 25 09:55 File4
-rw-r--r-- 1 root root 0 12月 25 10:05 file5
-rw-r--r-- 1 root root 0 12月 22 14:42 filee
-rwxr-xr-x 1 root test 164 11月 28 16:41 file.zip
drwxr-xr-x 2 root root 4096 12月 27 16:44 tar_dir
-rwxr-xr-x 1 root test 0 11月 28 15:18 .temp
[root@server dir]# unalias la
[root@server dir]# la
-bash: la: 未找到命令