Solved

How to make permanent Alias in Linux?

Posted on 2009-05-13
4
1,381 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Suggested Solutions

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now