Solved

How to make permanent Alias in Linux?

Posted on 2009-05-13
4
1,389 Views
Last Modified: 2013-12-16
How to make permanent Alias in Linux?
0
Comment
Question by:aloknet21
  • 2
4 Comments
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24381915
Hi,

Just add your alias commands in .bashrc file and they will be permanent and every time you log-on you'll get them back. But be careful I say .bashrc not .bash_rc ;-)

Cheers,
K.
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24381924
Once you edit .bashrc you'll see the default aliases and a comment that reads " # user specific aliases and functions"

Cheers,
K
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 24383861
add it to /etc/profile if you want it for all users or to .profile in user home dir
0
 
LVL 5

Accepted Solution

by:
0ren earned 250 total points
ID: 24405769
i think the right file for bash should be ~/.bash_profile.
/etc/profile is global for all users.
it will ~/.bash_profile if it exists
the syntax is :
alias l='ls -l'
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question