Pages

Showing posts with label alias. Show all posts
Showing posts with label alias. Show all posts

Set an alias (Linux Tutorial Series 02)

Some times, setting alias may save a lot of time.

Setting alias is very simple.

1. Go to your home folder
2. Open .bashrc file with vim or other editors (vim .bashrc and enter)
3. At the end of the file, type:       alias vi='vim'
4. Exit the editor after saving
5. On the terminal, type: source .bashrc (enter)

Now your alias is set.

To see the list of alias in your system, type at the terminal: alias

This will list all the alias.


Here is some useful aliases.


alias grep='grep --color'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias vi='vim'

You can comment on more useful aliases.

Here is another useful tip on alias.

In the above example, if you type 'ls', it will execute 'ls --color=auto'
However, sometime you may want to use unaliased 'ls'. This can be performed by using

backslash + comment.

Example.
\ls will execute just ls.

Hope this is useful.

You may be interested in these posts

Error in image file conversion: convert-im6.q16: not authorized `test.eps' @ error/constitute.c/WriteImage/1037.

This error is because of the vulnerability. This allows remote execution of code using image formats. So, some Linux distributions by defaul...