

The alias c for the current user can be made permanent by entering the following line: To avoid this problem, add alias to your ~/.bashrc file, enter: Once you logs out or reboot the system the alias c will be gone. The alias c remains in effect only during the current login session. You also need to delete the alias from the ~/.bashrc file using a text editor (see next section). In this example, remove the alias c which was created in an earlier example: You need to use the command called unalias to remove aliases. $ command ls How to delete/remove a bash alias # use /bin/ls command and avoid ls alias # $ c How to disable a bash alias temporarilyĪn alias can be disabled temporarily using the following syntax: Then, to clear the screen, instead of typing clear, you would only have to type the letter ‘c’ and press the key: In this example, create the alias c for the commonly used clear command, which clears the screen, by typing the following command and then pressing the ENTER key: To create the alias use the following syntax: How to define or create a bash shell alias

The general syntax for the alias command for the bash shell is as follows: How to list bash aliasesīy default alias command shows a list of aliases that are defined for the current user.
