Change command name in Linux
9,336
Solution 1
You can create an alias, as you have figured that out, or just use the key combination Ctrl+L to clear the screen contents.
Solution 2
Got it.
alias c="clear"
Now pressing c instead of typing clear
clears the screen.
Related videos on Youtube
Comments
-
Vins almost 2 years
Possible Duplicate:
creating abbreviations for commonly used pathsI'm new to the Linux platform. Is there any way to rename the commands available in Linux.
For example, I use the
clear
command a lot and instead of typing it every time I want to rename it as justc
. Is this possible ?-
user over 11 yearsNote that it's usually better to learn the proper command names (and relevant parameters) first. Otherwise, you will be thoroughly confused when using systems that do not have your customizations. That is a trap a lot of people who get used to having an alias
rm
torm -i
fall into, and it can be more or less dangerous depending on the exact commands involved.
-
-
jasonwryan over 11 yearsCtrl-l works as well...
-
Tobias Kienzler over 11 yearsDon't forget to add this line to your
.bash_profile
(or.bashrc
if the former is quite empty, depends on your distribution) to still have the setting after your next login