-bash: ll: command not found [Solved]

Andy

Administrator
Creative Team
User ID
1
Joined
7 Jan 2019
Messages
1,121
Reaction score
57
Points
48
Did you get ll: command not found error in SSH session? If yes, then read on how to fix it in less than one minute.

Reason for ll: command 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 run quite often. Thus, some Linux distributions provide an 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 such as Ubuntu, you may get an error when running ll, i.e.:
Bash:
-bash: ll: command not found

Solution

To fix this, you need to add command alias. Just run the following command:
Bash:
sudo echo "alias ll='ls -l'" > /etc/profile.d/ll.sh
It will make the command alias available to all SSH users, so if you log out from SSH and log back in, you can now type ll and save yourself those few milliseconds when you want to list the directory contents.
 
 Short URL:
Back
Top