alias and which in Ubuntu : moving from Fedora to Ubuntu

Tom H tomh0665 at gmail.com
Tue Oct 25 15:02:31 UTC 2016


On Tue, Oct 25, 2016 at 12:59 AM, Kevin Wilson <wkevils at gmail.com> wrote:
>
> In Fedora , running "which AliasName" shows the alias.
>
> For example, if I have
>
> $alias myAlias='echo test'
>
> $which myAlias
> alias myAlias='echo test'
>         /usr/bin/echo
>
> In Ubuntu, this does not work.
> After:
> alias myAlias='echo test'
> Runnin:
> $which myAlias
>
> shows nothing.
>
> Any idea - is there any setting or any way to get the same result as
> in Fedora ?

which in Ubuntu is provided by
https://tracker.debian.org/pkg/debianutils whereas which in Fedora is
provided by https://carlowood.github.io/which/

The Fedora version has an "-i" option to show aliases that the Ubuntu
version doesn't have.

You can run

$ alias ls
alias ls='ls -F'

$ command -v ls
alias ls='ls -F'

$ type ls
ls is aliased to `ls -F'




More information about the ubuntu-users mailing list