When you log on to a linux machine using the linux personalized settings. bashrc file, you need to customize the settings, such as the command alias and path. You can edit the. bashrc file in the personal directory. Step: 1. edit. bashrc file (such as/home/yihan. zy /.... linux personalized settings. when the bashrc file is logged on to the linux machine, you need to customize some personal settings, such as command alias and path. You can edit the. bashrc file in the personal directory. Step: 1. edit the. bashrc file under the personal account/home/user/(for example,/home/yihan. zy/. bashrc). 2. perform some personalized settings. Add the following content to the file: alias sa = "sudo-u admin-H" # custom command alias setutf = "export LANG = zh_CN.utf8" # custom command alias setgbk = "export LANG = zh_CN.GB18030 "cd/home/admin/# log on to this directory through ssh. 3. after saving and exiting, disconnect ssh and reconnect .. The settings in the bashrc file take effect. For the above example, after logging on to yihan. zy, the default path is/home/admin. note:. bashrc is explicitly called in the. bash_profile file. When you log on to linux and start bash, it will first read ~ /. Bash_profile file ~ /. Bashrc will be executed, and your personalized settings will take effect. Use source ~ /. Bashrc (or .~ /. Bashrc) immediately load the modified settings to make them take effect.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service