How to configure a custom command in a Linux system (Mac book also applies)

Source: Internet
Author: User

I believe that the students who are familiar with Linux have a problem is that if you want to view a file to a level or multilevel to the CD switch directory, which has a convenient way to switch the wood? Just like shortcut keys.
This is the configuration of the custom command in the Linux system, very simple??

In file/ROOT/.BASHRC, add the following line:

Alias mycommand = "Cd/root"

Executing mycommand directly at the terminal will execute Cd/root

?? : source ~/.bash_profile This command must be remembered for execution, and this line of command is to load your modified command in the system

~ This symbol represents your home directory,
. Bash_profile is a hidden file that is primarily used to configure the bash shell,
Source ~/.bash_profile is to make this configuration file effective immediately after modification.

How to configure a custom command in a Linux system (Mac book also applies)

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.