LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-17-2009, 03:26 AM   #1
Yan_Suryana
LQ Newbie
 
Registered: Feb 2009
Posts: 4

Rep: Reputation: 0
How to define custom alias in Ubuntu ?


Hello,
I am new here and my question is : How to define custom alias in Ubuntu automatically , so I can use it next time I do to login ?
Because every time I login, I need to define it using Terminal Mode.
I tried to put the command i. e "alias l='ls -l' in my .profile, but it didn't work, if I type alias it didn't come out what I put it .
Thanks.
 
Old 12-17-2009, 03:34 AM   #2
JML
LQ Newbie
 
Registered: Jan 2005
Location: TN
Distribution: Fedora, Debian, Arch
Posts: 4

Rep: Reputation: 1
The filename that the line alias l='ls -l' goes in is .bash_profile rather than .profile in your home directory. If it still isn't working, make sure your terminal application is actually getting a true login shell.

Last edited by JML; 12-17-2009 at 03:40 AM.
 
Old 12-17-2009, 03:38 AM   #3
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Put the alias in ~/.bashrc

Regards
 
Old 12-17-2009, 04:20 AM   #4
Yan_Suryana
LQ Newbie
 
Registered: Feb 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks . .

Quote:
Originally Posted by ~sHyLoCk~ View Post
Put the alias in ~/.bashrc

Regards
Thanks a Lot ~sHyLoCk~
 
Old 12-17-2009, 04:22 AM   #5
Yan_Suryana
LQ Newbie
 
Registered: Feb 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks anyway . .

Quote:
Originally Posted by JML View Post
The filename that the line alias l='ls -l' goes in is .bash_profile rather than .profile in your home directory. If it still isn't working, make sure your terminal application is actually getting a true login shell.
I couldn't find .bash_profile ..
But now I can define it in .bashrc

Thanks anyway ..
 
Old 12-17-2009, 05:10 AM   #6
millig
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Rep: Reputation: 0
Aliases

Don't put your custom aliases in .profile. Instead see the .bashrc in your home directory for adding aliases.
 
Old 12-17-2009, 08:32 PM   #7
Yan_Suryana
LQ Newbie
 
Registered: Feb 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks

Quote:
Originally Posted by millig View Post
Don't put your custom aliases in .profile. Instead see the .bashrc in your home directory for adding aliases.
I used to put aliases in .profile when I was working on SCO Unix about 15 years ago.

I am done with my aliases and put it in .bashrc

Thanks millig
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wildcard email alias in /etc/alias file custangro Linux - Enterprise 1 10-02-2009 12:17 PM
Define Netbios name in a minimal way for an Ubuntu server n.lindberg Linux - Server 6 02-27-2009 01:21 AM
Custom PC for Ubuntu 7.04 pastor.lito Linux - Hardware 12 04-24-2007 10:48 AM
define alias permanently RajRed Linux - General 4 11-19-2005 08:40 AM
Sending mail from shell: how to define custom headers? ricky_ds Linux - Software 3 06-22-2005 07:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration