[Bash] Create Aliases in .bash_profile for Common Bash Commands
.bash_profile is a file that bash invokes (or more technically sources) before the start of a new bash session. In .bash_profile, we have the opportunity to add variables, functions, and aliases to customize our bash environment and provide reusable functionality.
In this lesson, we’ll look at adding a git_sync alias as well as a ll alias. Aliases act like shortcuts and save us time and typing at the terminal. .bash_profile is a good spot for smaller functions and aliases.
Note that on most linux distributions you'll use .bashrc instead of .bash_profile.
1. cd ~
2. touch .bash_profile
3. Add alias
alias ll="ls -laG"
alias git_sync="git pull -r && git push"
4. To check what the alias does:
type ll
[Bash] Create Aliases in .bash_profile for Common Bash Commands的更多相关文章
- Bash脚本编程之脚本基础和bash配置文件
脚本基础 参考资料:Shell Scripts (Bash Reference Manual) 不严谨地说,编程语言根据代码运行的方式,可以分为两种方式: 编译运行:需要先将人类可识别的代码文件编译成 ...
- Common administrative commands in Red Hat Enterprise Linux 5, 6, and 7
https://access.redhat.com/articles/1189123 Common administrative commands in Red Hat Enterprise Linu ...
- [Bash] Create nested folder in Bash
We can create a single folder by doing: mkdir onefolder If we want to create nested folder we need t ...
- bash參考手冊之六(Bash特性)
6 Bash 特性 这部分描写叙述Bash独有的特性. * 调用Bash : Bash能够接受的命令行选项. * Bash启动文件 : Bash何时及怎样运行脚本. * 交互Shell : 什么 ...
- bash帮助文档简单学习;bash手册翻译
关于bash的四种工作方式的不同,可以参考:http://feihu.me/blog/2014/env-problem-when-ssh-executing-command-on-remote/,但是 ...
- windows的cmd下的find命令比bash(win10下的Ubuntu的bash)下的grep比较
同样的一个catalina文件,windows的cmd下的find命令比bash下的grep要慢,windows确实占下风啊
- [Shell]Bash基本功能:历史命令 & 别名 & Bash快捷键
/*----------------------------------------------------------------------------------------------- @黑 ...
- [Cypress] Create Aliases for DOM Elements in Cypress Tests
We’ll often need to access the same DOM elements multiple times in one test. Your first instinct mig ...
- The common Linux Commands
Linux的命令总结 1. man:在线请求系统帮助 例:man mkdir NAME:这个命令的完整全名 mk(make directories) SYNOPSIS:这个命令的基本语法 mkdir ...
随机推荐
- Java基础(1)JDK的安装与环境变量配置
最近在复习Java基础,第一课就是JDK的安装配置以及环境变量的配置,不多废话,直接开始吧 (1)去Oracle官方网站下载JDK 1.8 Java的历史想必大家也清楚,Sun公司开发的一门面向对象的 ...
- nginx 站点代理,负载均衡
nginx服务器IP是192.168.1.201 web服务器 IP 192.168.1.200,192.168.1.199 1.主配置文件是/etc/nginx/下的nginx.conf,另外一个是 ...
- HDU 5714 拍照 前缀和
拍照 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5714 Description 小明在旅游的路上看到了一条美丽的河,河上有许多船只,有的船只向左 ...
- Codeforces Round #275 (Div. 1)A. Diverse Permutation 构造
Codeforces Round #275 (Div. 1)A. Diverse Permutation Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 ht ...
- GIT(6)----fork和clone的区别,fetch与pull的区别
参考资料: [1].Git学习笔记:fork和clone的区别,fetch与pull的区别 [2].在Github和Git上fork之简单指南
- SlickOne敏捷开发框架介绍(一) -- 基于Dapper, Mvc和WebAPI 的快速开发框架
前言:在两年前(最初发布时间:2013年1月9日(csdn),当前文章时间2015年11月10日),项目组推出了基于Dapper,Mvc和WebApi的快速开发框架,随着后续Slickflow产品的实 ...
- LAMP架构之NFS
需求分析: 前端需支持更大的访问量,单台Web服务器已无法满足需求了,则需扩容Web服务器: 虽然动态内容可交由后端的PHP服务器执行,但静态页面还需要Web服务器自己解析,那是否意味着多台Web服务 ...
- Spring_Task初探(注解,XML配置)
这几天想写一个动态添加任务项目找了找Spring下的自带定时功能发现还真有,然后网上找了找资料写了个demo 写了两种方式来执行定时的任务(XML配置和注解) 先建两个普通的任务类(XML配置调用的任 ...
- js解析顺序了解一下??
我们在学习一种新事物的时候,总是知其然,而不知其所然.有些人会探究到底,有一些人会得过且过. 好了,开场白结束,直接进入正题. js不像C语言那样只要编译一次之后成.exe文件之后就不用在编译可以直接 ...
- cocos2d-x项目101次相遇:使用触摸事件移动 精灵
cocos2d-x 101次相遇 / 文件夹 1 安装和环境搭建 -xcode 2 Scenes , Director, Layers, Sprites 3 建立图片菜单 4 在 ...