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 ...
随机推荐
- redis订阅发布消息操作本地缓存
Redis 本地缓存+远程缓存方案 使用纯java的ehcache作为本地缓存 Reids 作为远程分布式缓存 解决redis缓存压力过大,提高缓存速度,以及缓存性能. Redis和ehcache缓存 ...
- 黄聪:PHP获取某一天前后任意时间
date("Y-m-d",strtotime('-30 days',strtotime('2016-9-30')));
- Linux运维小知识
自己日常用到的命令稍微备份一下: 版本确认 CentOS / RedHat Enterprise cat /etc/redhat-release Ubuntu cat /etc/lsb-release ...
- jmeter问题
1.使用jmeter传入json参数报错 具体场景:使用python+request执行接口测试,正常:把python的参数直接复制,使用jmeter执行接口测试,提示json格式错误. {...,& ...
- python 文件处理(转载)
本文给大家介绍Python文件处理相关知识,具体内容如下所示: 出处:https://www.jb51.net/article/80204.htm 1.文件的常见操作 文件是日常编程中常用的操作,通常 ...
- Odoo-10开发环境配置与测试
Odoo是使用Python写的开源ERP软件,这几年比较火.内部有实施能力的,这个软件还是很不错的.总体来说,国外的这类软件,更多是在做平台(比如微软的AX.SharePoint.SAP等)平台本身具 ...
- jmeter接口测试-线程组设置(断言失败后用例停止执行)
问题描述: jmeter跑接口用例的时候,其中一条用例的对断言失败后,后面的用例都不执行了! 解决思路1: 考虑应该有地方设置,在菜单栏找了半天没找到,百度也没有查到 解决思路2: jmeter源码导 ...
- JS获取option的value和text
window.onload = function(){ //首先获得下拉框的节点对象: var select = document.getElementById("s1"); // ...
- Cesium学习网址
不错的案例介绍: 根据地形瓦片直接绘制高程.坡度及等高线 同一场景下显示两个不同的瓦片图层 https://cloud.tencent.com/developer/article/1113355 绘制 ...
- react-native No bundle URL present
解决方案: 1.删除ios目录下的build的目录,关闭模拟器,重新react-native run-ios大多数情况下可以解决 2.