cls: command not found

I used ‘cls’ for it does clear screen and ls.
After I upgraded my ubuntu, i can’t use that any more. It showed:

cls: command not found

Finally I have found the solution.

You have to create a alias for the command you want to use.
For example, for cls

$ alias cls='clear;ls'

You can make more aliases,

$ alias cll='clear;ls -lh'

These aliases will vanish on your next login. So to make the change permanent you can add it to your ~/.bashrc or ~/.bash_profile. Just add the whole alias line as these files are executed (as bash scripts) on login.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s