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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Block special device messed up
    ... first try umount /dev/hdc if that helps. ... The early bird may get the worm, but the second mouse gets the cheese. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: /usr busy after aptitude operations?
    ... First step of "remount" is a umount. ... Sub-process returned an error code ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Pendrive corrupted filesystem
    ... Install dosfstools, umount the ... partition and fsck it. ... "A good plan today is better than a perfect plan tomorrow." ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Hotplugging more USB devices
    ... Ralph Kutschera wrote: ... > * What if I turn off my external hard disk? ... umount, "un"dev ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)