Today when I use Tomcat configuration, I use a Mac that uses some commands to configure Tomcat.
Here's the problem:
I am particularly troublesome to start the Tomcat service every time, because I have to go to the file directory where Tomcat is located, or not to use ~/, but because I put Tomcat in a more "deep" folder, the command looks ugly and long.
Problem Solutions:
1. Use environment variables (methods for modifying. BASHRC)
A. First look at what shell your Mac is currently using
Echo $SHELL
The returned results are similar to
Here I am zsh, maybe you are bash, but that's OK, the pattern of configuring environment variables is the same
B. Then you need to know what files zsh or bash will execute each time you open the terminal (Google searches, there is a lot of information),
Here you just need to know the files that will be executed, zsh words are. ZSHRC Bash's words are. BASHRC
So you need to open. ZSHRC (if it's bash, open. BASHRC), use VI vim cat Open with your
And then, at the end, type
Export path=/users/zazalu/music/: $PATH
The middle path fills in the path you want to add to the system environment variable.
Save when you're done modifying
C. Then activate the configuration you just
source. ZSHRC // The word for bash is source. BASHRC
D. Restart the terminal and you will find that the environment variable is already configured ~
2. Rename a terminal instruction using alias
can see this Oh ~
http://blog.unieagle.net/2012/05/21/
[Shell&mac&environment variables] own commonly used Mac (or Linux) Shell command summary, including MAC using ZSH Shell environment variable configuration method