Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc
Mike McCarty wrote:
> Alvin Oga wrote:
>
>> hi ya
>>
>>
>>> forgot-who started it
>>
>>
>>
>>>> Is there a good system for setting variables, aliases, etc that
>>>> need to be
>>>> set for user X, whether I log in at a login prompt or using su? I'm
>>>> confused by all the different .profile options (there are at least
>>>> 3 for
>>>> bash, why is that?)
>>>
>>
>>
>> why ?? because ... long history ...
>>
>> general rule ...
>>
>> - if you're confused .. do NOT change files in anything other
>> than your own home directory "/home/you"
>
>
> My solution to this nonsense is to have a file
>
> /home/me/my_startup
Might he need to do this in his .bashrc (or /etc/bash.bashrc on a single
user system) to make this work?
sources /home/me/my_startup
BTW, you can use functions in that file or the .bashrc file ex. (note
the @ sign will take whatever the perimeter is to be..
######################
# Functions
######################
function mfloppy { mount /dev/fd0 /mnt/floppy; }
function umfloppy { umount /mnt/floppy; }
function mdvd { mount -t iso9660 -o ro /dev/dvd /mnt/dvd; }
function umdvd { umount /mnt/dvd; }
function mcdrom { mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom; }
function umcdrom { umount /mnt/cdrom; }
function vib { vi ~/.bashrc; }
# handy grep function
function gw { grep $@ /etc/* -d recurse -l; }
function sources { vi /etc/apt/sources.list; }
# Handy function for doing ssh to multiple servers in the same domain
function ssh-r {ssh -l root $@.example.com; }
# Shorten the line to restart a service
function restart { /etc/init.d/$@ restart; }
--
Highest Regards,
Rodney Richison
RCR Computing
http://www.rcrnet.net
118 N. Broadway
Cleveland, OK 74020
918-358-1111
Reply to:
- References:
- Re: Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc
- From: Alvin Oga <aoga@mail.Linux-Consulting.com>
- Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc
- From: Mike McCarty <mike.mccarty@sbcglobal.net>
- Prev by Date:
Re: Is my system compromised
- Next by Date:
Re: Backing up Windows using rsync
- Previous by thread:
Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc
- Next by thread:
Re: Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc
- Index(es):