Command-Line – Can I Edit a Bash Shell Command?

14.04bashcommand linegnome-terminal

I just wants to modify a bash shell command like exit so when i write exit in the terminal it clears the screen, and echo some text, wait 2 seconds, then execute the exit function.
So is there any way to modify a shell command on Ubuntu, if there is away how ?

Best Answer

You can use a shell alias

alias exit='clear; sleep 2; exit'

To make it permanent, add the alias to the bottom of the ~/.bashrc file. see this thread for help

Related Question