bashrc和bash_profile
在~/.bashrc中起别名
!/bin/bash下必须加上shopt -s expand_aliases
#!/bin/sh下不用
shopt -s expand_aliases
这一条命令让shell脚本中的alias可以使用。但是经测试,在#!/bin/sh下,该命令可有可无,不影响alias的使用,在!/bin/bash下,才有影响。
~/.bash_profile中也不用
#go
export GOPATH="/Users/didi/go"
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOBIN
#mysql
export PATH=${PATH}:/usr/local/mysql/bin
export PATH="/usr/local/opt/php@7.0/bin:$PATH"
#vscode
export PATH=/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin:$PATH
#alias
alias ll="ls -al"
alias pull="git pull"
alias status="git status"
#ssh alias
alias serv="sshpass -p '密码' ssh 用户@ip"
bashrc和bash_profile的更多相关文章
- /etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc
/etc/profile./etc/bashrc.~/.bash_profile.~/.bashrc很容易混淆,他们之间有什么区别?它们的作用到底是什么?/etc/profile: 用来设置系统环境参 ...
- linux的/etc/profile、~/.profile、~/.bashrc、~./bash_profile这几个配置文件
在添加环境变量的时候,我们会去修改配置文件 如果留意过,网上博文,有些在/etc/profile文件中配置的,有些是在~./bash_profile文件中配置的,等等 那么,/etc/profile. ...
- Linux 启动时profile、bashrc、~/.bash_profile、~/.bashrc、~/.bash_profile执行顺序以及文件说明
Linux 启动时profile.bashrc.~/.bash_profile.~/.bashrc.~/.bash_profile执行顺序以及文件说明 一.执行顺序 登录linux时,/etc/pro ...
- linux命令(24):/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc
/etc/profile./etc/bashrc.~/.bash_profile.~/.bashrc很容易混淆,他们之间有什么区别?它们的作用到底是什么? /etc/profile: 用来设置系统环境 ...
- linux下/etc/profile、/etc/bashrc、~/.bashrc 和~/.bash_profile文件的区别
这个一定要理解登录式shell和非登录式shell的区别,前者是完全切换用户,后者是不完全,就算切换过来了,你pwd时家目录还是之前的家目录,所以 登录式顺序为:/etc/bashrc---/etc/ ...
- linux下/etc/profile /etc/bashrc /root/.bashrc /root/.bash_profile这四个配置文件的加载顺序
目录 一.关于linux配置文件 二.验证四个配置文件的加载顺序 三.结论 一.关于linux配置文件 1.linux下主要有四个配置文件:/etc/profile ./etc/bashrc ./ro ...
- linux关于profile 、bashrc 、.bash_profile、.bashrc的区别
linux关于profile .bashrc ..bash_profile..bashrc的区别 - /etc/profile /etc/bashrc ~/.bash_profile ~/.bashr ...
- Linux中profile、bashrc、bash_profile之间的区别和联系
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置. 英文描述为: # /etc/pr ...
- /etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 的区别(转)
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行并从/etc/profile.d目录的配置文件中搜集shell的设置. /etc/bashrc:为每一个运 ...
- Linux_linux中profile、bashrc、bash_profile之间的区别和联系(转)
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行. 并从/etc/profile.d目录的配置文件中搜集shell的设置. 英文描述为: # /etc/p ...
随机推荐
- R-shiny服务器安装及配置
R的shiny 服务器管理-入门http://www.bio-info-trainee.com/1683.html sudo systemctl start shiny-serversudo syst ...
- bond模式
1.mode=0(balance-rr)(平衡抡循环策略) 链路负载均衡,增加带宽,支持容错,一条链路故障会自动切换正常链路.交换机需要配置聚合口,思科叫port channel.特点:传输数据包顺序 ...
- WebApi Owin OAuth
Microsoft.Owin.Host.SystemWeb Owin Microsoft.Owin Microsoft.Owin.Diagnostics Owin Micros ...
- Vue+Typescript项目中使用echarts
方案一:推荐 在typescript+Vue的项目中引用echarts,为了加强引用,引入echarts和@types/echarts两个包,一个是工程依赖,一个是声明依赖. npm install ...
- vue 跨域问题
前段时间做一个vue打包成安卓和IOS的App,遇到了跨域问题,直接拿了之前项目的配置,却不起作用. import org.springframework.context.annotation.Con ...
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)解答
我在使用mysqll客户端连接我的mysql服务器的时候,出现了上述的问题.我的操作系统是ubuntu,安装版本是对应的64位服务器.我的服务器的启动方式是sudo service mysql sta ...
- LeetCode【104. 二叉树的最大深度】
最开始的想法就是递归,但是,自己想的太麻烦,每个节点与null相比较,如果都不为null,count就加一,然后输出count, 其实,这中间有很多错误,然后,就想着想着就绕不出来了.然后,重新思考了 ...
- Mybatis常见疑问
1.在连接数据库时候,mysql是否支持fetchsize分页获取? 满足以下几个条件,可以使用fetchsize,根据游标获得记录 ①MySQL 从5.0.2开始支持分页获得. ②同时需要在jdbc ...
- SQL FOR JSON PATH 返回 json
--直接返回 age FOR JSON PATH --返回值 [{"name":"张学友","age":60}] select c1, c2 ...
- Centos6、7下安装Nginx的两种方法
一,通过yum命令安装 1.操作系统版本的确认很重要,因为下一步我们要依靠这个来创建yum源文件 2.创建 nginx.repo vi /etc/yum.repos.d/nginx.repo 文件内容 ...