Linux personalized settings. bashrc File

Source: Internet
Author: User

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 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.

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.