Linux Learning Notes
Practice
Environment variable in Linux
Ref:
https://www.cnblogs.com/youyoui/p/10680329.html
https://www.jianshu.com/p/888b75667281
Files for Env
files for env:
1 | /etc/profile |
The sequence of loading env:
Display Env
echo $PATH
for a single envenv
orexport
for all the env
Set Env
- Modify
.bashrc
or.profile
for a single user
1 | echo 'PATH=$PATH:~/biosoft/ncbi-blast-2.8.1+/bin/' >> ~/.bashrc |
or
1 | vim ~/.bashrc #在文件其末尾加上下面一句 |
- Modify
/etc/profile
for every user
1 | echo 'PATH=$PATH:~/biosoft/ncbi-blast-2.8.1+/bin/' >> /etc/profile (root用户或者sudo权限用户) |
export
only for current shell
1 | export <var>=<value> |
curl for testing
Ref:
http://www.ruanyifeng.com/blog/2011/09/curl.html
https://www.ruanyifeng.com/blog/2019/09/curl-reference.html
When we are in the Linux server, we may not be able to use postman or web tool. So we may use curl
to make request