Site icon GetPageSpeed

-sh: 1: ll: not found [SOLVED]

Did you get ll: not found error in SSH session? If yes, then read on how to fix it in under one minute.

Reason for ll: not found error

In SSH session of Linux system, often times you want to get listing of files inside a directory. And it’s most convenient to have each file displayed on its own line, with permissions. The command to do so is ls -al.

This command is ran quite often. Thus, some Linux distributions provide easy shortcut for it. Just type ll on the command prompt and it will produce the same output as ls -al.

However, on Debian derived systems like Ubuntu, you may get an error when running ll, i.e.:

-sh: 1: ll: not found

Solution

To fix this, you need to add command alias. Just run the following command

sudo echo "alias ll='ls -l'" > /etc/profile.d/ll.sh

It will make the command alias available to all SSH users. Logout from SSH and log back in. You can now type ll and save yourself those few milliseconds when you want to browse directory contents.

Exit mobile version