7

In Fedora, instead of typing ls -l, you can type ll. What causes this behavior? I've installed a new Debian system that does not appear to have this functionality. They're both running Bash. I can define an alias for alias ll=ls -l, but I'm wondering what the root difference is between these two bashes.

  • As a side note, to stay universal across different Linux/Unix distributions it is better to stick to default commands that work everywhere without extra effort. And ls -l command is very short anyway so ll doesn't add much value. – golem Apr 28 '15 at 23:06
6

From Fedora /etc/bashrc:

    for i in /etc/profile.d/*.sh; do
    if [ -r "$i" ]; then
        if [ "$PS1" ]; then
            . "$i"
        else
            . "$i" >/dev/null
        fi
    fi
    done

And in /etc/profile.d are files in which are defined aliases. ll is defined in /etc/profile.d/colorls.sh

4

Check out type ll to see :) On Fedora you're likely to get something like ll is an alias for ls -l, which would mean that Fedora just comes preconfigured with the same alias you've mentioned.

  • Cool. I don't have a Fedora machine at the moment. Have you tried it on a Fedora machine and is that the output you get? – drs Apr 27 '15 at 13:40
  • No, that's on an old LMDE (Debian-based) machine with zsh. Actually I'm using oh-my-zsh with its default aliases turned on. – Erathiel Apr 27 '15 at 13:42
  • Here it is on Fedora 21: type ll Output= ll is aliased to `ls -l --color=auto' – somethingSomething Apr 27 '15 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.