.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的更多相关文章

  1. Bash脚本编程之脚本基础和bash配置文件

    脚本基础 参考资料:Shell Scripts (Bash Reference Manual) 不严谨地说,编程语言根据代码运行的方式,可以分为两种方式: 编译运行:需要先将人类可识别的代码文件编译成 ...

  2. 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 ...

  3. [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 ...

  4. bash參考手冊之六(Bash特性)

    6 Bash 特性 这部分描写叙述Bash独有的特性. *  调用Bash : Bash能够接受的命令行选项. *  Bash启动文件 : Bash何时及怎样运行脚本. *  交互Shell : 什么 ...

  5. bash帮助文档简单学习;bash手册翻译

    关于bash的四种工作方式的不同,可以参考:http://feihu.me/blog/2014/env-problem-when-ssh-executing-command-on-remote/,但是 ...

  6. windows的cmd下的find命令比bash(win10下的Ubuntu的bash)下的grep比较

    同样的一个catalina文件,windows的cmd下的find命令比bash下的grep要慢,windows确实占下风啊

  7. [Shell]Bash基本功能:历史命令 & 别名 & Bash快捷键

    /*----------------------------------------------------------------------------------------------- @黑 ...

  8. [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 ...

  9. The common Linux Commands

    Linux的命令总结 1. man:在线请求系统帮助 例:man mkdir NAME:这个命令的完整全名 mk(make directories) SYNOPSIS:这个命令的基本语法 mkdir ...

随机推荐

  1. CF1060E Sergey and Subway 思维

    分两种情况讨论 一种为奇数长为$L$的路径,在经过变化后,我们需要走$\frac{L}{2} + 1$步 一种为偶数长为$L$的路径,在变化后,我们需要走$\frac{L}{2}$步 那么,我们只需要 ...

  2. BZOJ 3130: [Sdoi2013]费用流 网络流 二分 最大流

    https://www.lydsy.com/JudgeOnline/problem.php?id=3130 本来找费用流的题,权当复习一下网络流好了. 有点麻烦的是double,干脆判断大小或者二分增 ...

  3. mutiplemap 总结

    之前只是在C++ Primer里面看过关联容器,可能因为没有实际用过,只是看看,所以导致用的时候并不熟悉: 在这之前,map和set的特性应该要了解,map是关联数组,也就是由键值对组成的,而set只 ...

  4. opencv第一课 打开一个图片

    #include<stdio.h>#include<stdlib.h>#include<opencv2\opencv.hpp>#include<iostrea ...

  5. ROS知识(14)----局部避障的动态窗口算法(DWA)及其调试的方法

    Dynamic Window Approach(DWA)是重要的局部轨迹规划算法,ROS中使用了DWA算法获得了很好的局部路径规划的效果.具体的教程可参考官方的导航调试资料Navigation Tun ...

  6. erlang资料

    http://www.cnblogs.com/--00/tag/Erlang/ http://blog.csdn.net/turingbooks/article/details/3247749 htt ...

  7. .NET泛型02,泛型的使用

    在" .NET泛型01,为什么需要泛型,泛型基本语法"中,了解了泛型的基本概念,本篇偏重于泛型的使用.主要包括: ■ 泛型方法重载需要注意的问题■ 泛型的类型推断■ 泛型方法也可以 ...

  8. 29防止程序集被篡改仿冒,全局程序集缓存GAC

      为什么需要强名称程序集和数字签名 有一个类库项目ClassLib,对应的程序集是ClassLib.dll.当前控制台项目引用ClassLib.dll程序集的方式有2种: 1.通过添加现有项目 文件 ...

  9. Oracle的数据类型

    Oracle基本数据类型(亦叫内置数据类型 built-in datatypes)可以按类型分为: 字符串类型.数字类型.日期类型.LOB类型.LONG RAW& RAW类型.ROWID &a ...

  10. 扩展redisTemplate实现分布式锁

    原文:https://blog.csdn.net/qq1010267837/article/details/79697572 依赖jar包 compile group: 'redis.clients' ...