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 ...
随机推荐
- VirtualBox虚拟机禁止时间同步
某机器为客户提供,宿主机时间快了20分钟,导致虚拟机时间也跟着快20分钟,每次更改完虚拟机时间,不到1分钟时间又变回去了 在一些情况下必须让VirtualBox虚拟客户机的时间和主机不同步,百度了一番 ...
- vue 中结合百度地图获取当前城市
首先需要去百度地图开发者平台申请 ak http://lbsyun.baidu.com/index.php?title=%E9%A6%96%E9%A1%B5 在index.html 中引入script ...
- source-insight 常用操作
[Ctrl + ] 跳转到函数.宏.变量 等定义处. [Alt > ] 跳转到最近光标停留位置. [Alt < ] 跳转到上次近光标停留位置. [Ctrl Shift [ ] 块位置开 ...
- rocketmq 4.3.2 解决远程不能消费问题,解决未识别到公网IP问题
1.解决远程不能消费问题 问题描述: nameserver和broker启动后,用tools(命令如下)能发送消息和消费消息,在局域网服务器能发送消息,消费启动后收不到消息通知问题 sh tools. ...
- .NET MVC 表主外键关系 JSON 无限循环 方案二(推荐)
public class JsonResultObject:JsonResult { private Newtonsoft.Json.JsonSerializerSettings Settings { ...
- h5需要的浏览器插件
google浏览器插件: web前段助手.vue-tools.草料二维码
- 使用密钥登录CentOS系统(基于密钥的认证)
在Window客户端有多种软件可以登陆ssh,比如putty,xshelll,secureCRT,我就以xshell为例设置使用公钥和私钥验证登陆服务器. 使用Xshell密钥认证机制远程登录Linu ...
- 使用 AWK 去掉文本文档中的空白行
在 Linux 操作系统中,可以使用 AWK 命令高效地处理文本文档.AWK 命令通过执行使用 AWK 语言编写的脚本程序,处理文本文档.AWK 脚本程序是由模式(patterns)与相关操作(cor ...
- bzoj5110: [CodePlus2017]Yazid 的新生舞会
Description Yazid有一个长度为n的序列A,下标从1至n.显然地,这个序列共有n(n+1)/2个子区间.对于任意一个子区间[l,r] ,如果该子区间内的众数在该子区间的出现次数严格大于( ...
- Druid密码加密
pom里引用: <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring ...