Handy Linux/Bash tidbits
Lest this blog remain a simple mirror of my del.icio.us entries, I should probably provide something interesting to read. Here goes...
Every time I set up a new Linux box, I install some utilities and configure a few things to create a common environment that I'm comfortable in. I'll document those things here for my own benefit, but also in the hopes that it might help someone else.
My distro of choice is Debian, so YMMV with other distros.
apt-get -u install ssh less vim screen
edit root .bashrc:
Modify or comment out the "export PS1" line and add:
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\
\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
This makes the prompt red and the current directory cyan, something like: root@tetra:/var/tmp$
I do the same for my account, but make the prompt green. This makes it easy to tell whether I'm myself or root:
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\
\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
This give you something like: bvoss@tetra:/var/tmp$
I also like to make sure "alias rm='rm -i'" and "alias dir='ls -AlFh --color | less -REX'" are present in there somewhere. And, yes, I use "dir" to get a directory listing. Very DOS of me, innit?