Solved

How to make permanent Alias in Linux?

Posted on 2009-05-13
4
1,400 Views
Last Modified: 2013-12-16
How to make permanent Alias in Linux?
0
Comment
Question by:aloknet21
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

717 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