It is currently Tue, 30 Nov 2021 18:07:49 GMT

Author Message
 How to define aliases on startup

I'm new to linux.  I was just wondering how you're supposed to define
aliases on startup.  what I want to do is alias ls='ls --color' and have
that executed on startup.


 Tue, 01 Feb 2000 03:00:00 GMT   
 How to define aliases on startup

It shows that you are new to Unix.  By saying "startup" you are
definitely displaying a DOS mentality.  It's not useful to define
aliases at startup - you need to define them at login.

Put them in your ~/.profile or other login script.  For details see
the man page for your shell.

    \\   ( )   No Bullshit!   | Email:
 .  _\\__[oo       from       | Phones: +44 121 471 3789 (home)
.__/  \\ /\@  /~)  /~[   /\/[ |   +44 121 627 2173 (voice) 2175 (fax)
.  l___\\    /~~) /~~[  /   [ | PGP-fp: D7 03 2A 4B D8 3A 05 37...
 # ll  l\\  ~~~~ ~   ~ ~    ~ |
###LL  LL\\ (Brian McCauley)  | Finger:

 Wed, 02 Feb 2000 03:00:00 GMT   
 How to define aliases on startup

No you don't want it to be executed at start up. You want alias to be defined
when starting a shell. When the shell starts it reads some files and runs the
commands in them, but the files will be different named depending on which
shell you're using, furthermore it differs a bit if it is a login shell or
a non-login shell (for example if you open a shell terminal in X). For details
type 'man $0' ($0 will expand to the shell you're currently using). For a
temporarily solution to your specific idea you can edit the .cshrc or .bashrc
file in your home directory or the /etc/login.cshrc or /etc/bashrc (depending
on which shell you're using) which is actually a better solution since it
affects all accounts (you should _not_ use root in your all day work - since
that gives you the possibility to really{*filter*}things up)


 Thu, 03 Feb 2000 03:00:00 GMT   
   [ 3 post ] 

Similar Threads

1. gcc #define #define #define

2. Aliases in X - where defined?

3. format of user-defined alias file

4. help defining csh alias

5. Define Tcsh Alias with $ Character as Regexp

6. tcsh: define function-like alias

7. : Alias defining

8. Define alias for a metacharacter in [t]csh?

9. Where are aliases defined for /bin/sh?

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software