Reprint: http://www.91pen.net/linux-system-set-up-to-resolve-the-alias-command-to-restart-after-failure-problem.html
In the process of using a Linux system, most of the cases are performed under the character interface. There are some long commands that we don't want to repeat each time, which is not only a waste of time but also error-prone; we use the alias command to solve
Like what:
Alias ll=' ls-l--color
This will allow us to enter ll directly in place of this long or longer command next time.
But just like this, it will expire after a reboot, the solution is to edit the ~/.BASHRC file
Vim ~/. BASHRC
Wq after saving the file, run:
SOURCE ~/. BASHRC
(otherwise not effective)
If not, the description does not have a ~/.bash_profile file, or the. bashrc file is not executed in the file.
(. bash_profile files are files that are automatically executed when the user logs on to the terminal, which is typically called in this file. BASHRC)
If so, the file needs to be opened (created first if not):
~/.bash_profile
Add a line inside:
SOURCE ~/.BASHRC
It's OK.
Troubleshoot a Linux system that fails after you set the alias command restart