Reputation: 11
I'm learning some shell commands on ubuntu 12.04. But I had a hard time unaliasing something I have set before. For example,
$ alias dir ls
$ dir
[some files and directories]
$ unalias dir
- no such command.
Does Ubuntu not support dir
command? How can I de-aliasing dir
using shell command?
Upvotes: 1
Views: 169
Reputation: 5381
First you ahve to define your alias using this syntax:
alias dir=ls
Then you can check if it worked out:
me@foo:~alias
alias dir='ls'
alias l.='ls -d .* --color=auto'
...
After this works you can simply unalias with:
unalias dir
I think the dir command is a binary in Ubuntu, you can check this using:
which dir
If it gives you a path to an executable you know that dir is no alias.
Upvotes: 1