.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. 【spfa】【动态规划】zoj3847 Collect Chars

    转载自:http://blog.csdn.net/madaidao/article/details/42616743 Collect Chars Time Limit: 2 Seconds       ...

  2. 20172333 2017-2018-2 《Java程序设计》第6周学习总结

    20172333 2017-2018-2 <Java程序设计>第6周学习总结 教材学习内容 1.数组的基本用法,如数组的定义:int[该数组类型] name = new int[X]X为数 ...

  3. 【JavaScript代码实现一】数组去重

    function arrayNoDupulate(array) { var hash = {}; var result = []; for(var i=0;i<array.length;i++) ...

  4. codevs 1063 合并果子 STL 优先队列

    1063 合并果子 Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://codevs.cn/problem/1063/ Description 在一 ...

  5. POJ 1654 Area 计算几何

    #include<stdio.h> #include<string.h> #include<iostream> #include<math.h> usi ...

  6. lykchat+zabbix实现微信告警

    http://www.ttlsa.com/zabbix/lykchat-zabbix-wechat-alert/

  7. Android native层动态库注射

    1.简单介绍 本文解说在Android native层.root权限下.注射动态库到目标进程,从而hook目标进程中动态库的函数的实现方式. 文中的源代码所有来源于网络.我仅仅是略微加以整理. 环境: ...

  8. linux系统负载相关的概念和度量

    系统负载有 CPU利用率 和 LoadAverage这2个概念. cpu利用率:cpu utilization,是进程(task)被内核调度进程实际分配了CPU资源后,在时间片内使用CPU进行工作运算 ...

  9. 【spring cloud】【docker】使用docker在centOS上部署spring cloud微服务架构服务

    项目GitHub地址 ================================================================================== 部署过程: ...

  10. gflags摘记

    projcet url: https://github.com/schuhschuh/gflags usage: commandline flags processing DEFINE: Defini ...