This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Newbie Alias and Profile questions
- From: Thorsten Kampe <thorsten at thorstenkampe dot de>
- To: cygwin at cygwin dot com
- Date: Sun, 16 Feb 2014 10:08:49 +0100
- Subject: Re: Newbie Alias and Profile questions
- Authentication-results: sourceware.org; auth=none
- References: <52F979B0 dot 2080604 at ptd dot net>
* Mike Rushton (Mon, 10 Feb 2014 20:15:28 -0500)
> I am trying to put an alias in a .bashrc
>
> alias clear='printf "\033c"'
clear is part of the ncurses package, so I would simply install this.
> But what .bashrc do I put this in ? in /ect/skel or the one my user
> directory. I put this code in and it seems to get overwritten.
> I don't understand what I am doing wrong.
/etc/skel is a template directory for new users.
> It is a minor thing that i can't clear the screen, but i want to work at
> this and try to fix this.
>
> Then I want to add a script to my profile. but what one the
> .profile or .bash_profile ?
The two bash specific files you need to know are .bash_profile and
.bashrc. Bash is different to other shells in that it will only read
one of those two depending on whether bash is run as a login shell or
not.
The recommended way is to source .bashrc from .bash_profile (this is
already the Cygwin default) and to leave .bash_profile empty. Put
everything you need into .bashrc.
Forget about .profile. It's only needed for backward compatibility
and not an official bash file.
Thorsten
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple