Sunday, August 26, 2007

Alias in Linux

Are you tired with long command when you install package by apt-get. There are ways to make it easy.

Yes, use alias in your .bashrc file.

here are some of my .bashrc :

--------------------------------------



1 # .bashrc
2
3 # Source global definitions
4 if [ -f /etc/bashrc ]; then
5 . /etc/bashrc
6 fi
7
8 alias pg='ps -A |grep '
9 alias df='df -h'
10 alias du='du -h'
11 alias ls='ls --color=always'
12 alias lt='ls -lt'
13 alias ll='ls -l'
14 alias l.='ls -d .*'
15 alias mn='matlab -nodesktop'
16 alias mn7='matlab7 -nodesktop'
17 alias pp='ps -e -o pid,ppid,command'
18 alias gi='gvim'
19 alias rg='rpm -qa |grep '
20 alias lc='locate '
21 alias as='apt-cache search'
22 alias ai='sudo apt-get install '
23
24 # User specific aliases and functions
25 export PATH=$PATH:/sbin/:~/bin:/usr/local/texlive/2005/bin/i386-linux
26 if [ -f /etc/bashrc ]; then
27 . /etc/bashrc
28 fi
29 PS1="[\u: \w]$ "
30 #export LC_ALL="zh_CN.GB18030"
31
32 LC_CTYPE="zh_CN.UTF-8"
33 #export LANG="zh_CN.GB18030"
34 #export LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN
35 #export LC_CTYPE=zh_TW.UTF-8
36 #export XMODIFIERS=@im=SCIM
37 #export GTK_IM_MODULE=scim-bridge
38 #export QT_IM_MODULE=scim-bridge #使 SCIM 能够输入中文
39 #export XMODIFIERS=@im=scim
40 xset -b
41
42 export PATH=$PATH:/home/kekegg/SBW/bin
43 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/kekegg/SBW/lib"
44
45 export SBW_HOME="/home/kekegg/SBW"
46 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/usr/local/lib":"/usr/local/Matlab74/bin/glnx86/":"/usr/local/Matlab74/sys/os/glnx86/":"/usr/lib/":"/usr/local/lib/"
47
48 if [ -f /etc/bash_completion ]; then
49 . /etc/bash_completion
50 fi

No comments: