Alias for command in Linux

Source: Internet
Author: User

I have long wanted to play with Linux when I use an alias for a command in Linux. Some time ago I could not bear to install Ubuntu12.04. at first I felt very good. But due to the serious lack of software, I want to install it back to windows, it is too troublesome. After a while, I didn't think about how to learn it when I installed Linux. I went to watch the tutorials on software installed on Linux windows, and I am suffering from death, today is a bit rewarding. Next, let's get started with the topic: You need to download the python software from Linux, but it may be caused by permission issues during the initial installation. As a result, shortcuts cannot be used, and you have not been able to get involved for a long time. Every time you start matlab, you must go to the installation path of matlab and enter./matlab. Or enter/home/bearox/download/Matlab/bin/matlab to start the program. Suddenly, when I was a freshman, I thought I had learned to give Linux commands a false name. Then, find the alias command. Alias = actual name, for example, you only need to run alias matlab =/home/bearox/download/Matlab/bin/matlab on the terminal. Every time you enter matlab, it will treat it as/home/bearox/download. /Matlab/bin/matlab command. Note that '=' has no spaces on both sides. However, it was discovered that this was a one-time operation only during this login. In the next logon, you have to re-enter this command. This is obviously quite troublesome. I checked the tutorial and found that a. profile file needs to be changed, but it cannot be changed. Finally, find the solution as follows vi ~ /. Bashrc // that is, the change is ~. Add alias matlab =/home/bearox/download/Matlab/bin/matlab At the bottom of the/bashrc file. Note that there is no space on both sides of the equal sign, and the following path does not require double quotation marks or single quotation marks. Finally, run source ~ on the terminal ~ /. Bashr is done at this time, and then input matlab on the terminal to open the application.

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.