freebsdrocks.net was started originally as nospam.mine.nu.
There are a few different tricks I use for using the Shell. The first thing I would do is change your shell to TCSH. Run the following command as root:
# chsh user
Drop down to the Shell line and make it look like the following line:
Shell: /bin/tcsh
Save and Exit. Now type exit again and login again as that user. You should now have a Prompt.
Now the next thing I like to do is I like to know the full path of the directory of where I am at. It makes it easier to know where you're at without having to type pwd all the time. The first thing you will want to do is to edit your .cshrc in your home firectory so lets do that:
# vi ~user/.cshrc
Scroll down to the line that looks like this:
# An interactive shell -- set some stuff up
Comment out the set prompt line already in there by putting a # in front of it and then create a new line by hitting the O key on your keyboard. Now put this line in:
set prompt="[%B%/%b] user@host# "
Exit and save. Now type
# source ~user/.cshrc
You should now see a prompt like so:
[/home/user] user@host#
What I would suggest doing next is doing the same thing for your root account:
# vi ~root/.cshrc
Scroll down to the section where it says "# An interactive shell -- set some stuff up" and go down where it has a set prompt section and delete that line. Add the following line:
set prompt="[%B%/%b] root@host# "
Then save and exit. If you are root now, Just type
# source ~root/.cshrc
and you will now see a custom root prompt. Nice job!
The last thing I do to my .cshrc is add a ton of different shortcuts. I still like using the old dos commands like dir and stuff. Add the following line to your .cshrc:
alias wtf echo "I dunno"
so if you do
# source ~user/.cshrc
and then you type "wtf" at the prompt, It will reply "I dunno".
Here is a list of the different aliases I use in my ~root/.cshrc
alias wtf echo "I dunno"
alias tgz "tar cvzf"
alias sendfilter "tai64nlocal < /var/log/qmail/qmail-send/current"
alias smtpfilter "tai64nlocal < /var/qmail/supervise/qmail-smtpd/log/main/current"
alias popfilter "tai64nlocal < /var/log/qmail/qmail-pop3d/current"
alias sslfilter "tai64nlocal < /service/smtpssl/log/main/current"
alias dropfilter "tai64nlocal < /var/log/maildrop/current"
alias tinydnslog "tai64nlocal < /service/tinydns/log/main/current"
alias portsearch "sockstat -l | grep "
alias mcdrom "mount_cd9660 /dev/acd0 /cdrom"
alias ucdrom "umount /cdrom"
alias space "du -hs"
alias h history 25
alias j jobs -l
alias la ls -a
alias lf ls -FA
alias ll ls -lA
alias dir "ls -laG"
alias remove "rm -dfr"
alias i "make install clean distclean"
alias up "/usr/libexec/locate.updatedb &"
alias sup "cvsup -g -L 2 ~root/stable-supfile"
alias pup "cvsup -g -L 2 ~root/ports-supfile"
alias chkdsk "df -h"
alias qstat "qmailctl stat"
alias proc "ps -auxw | grep "
DNS on the connecting IPs. Edit the following file
# vi /etc/ssh/sshd_config
and look for the UseDNS setting and uncomment it and change yes to no. Then you'll want to restart ssh in order for the changes to take effect.
# killall -HUP sshd
Thats it for Shell Customizations!