There is a point to this story, but it has temporarily escaped my mind...
Contact Me MyFaceBook MyLinkedIn MyGitHub MyTwitter

Customize Linux Shell

These are the steps I do the first time I log on to a Linux system.

cat >> ~/.bashrc << EOF
case \${TERM} in
  dumb)
    # Filezilla doesn't like my profile
    ;;
  *)
    ################################################################
    # Julian's Aliases
    alias dir='ls -lah'
    alias ll='ls -lh --color=auto'
    alias ls='ls --color=auto'
    alias cls='clear'
    alias df='df -h'
    alias du='du -h'
    alias grep='grep --color'
    alias diskusage='du -h --max-depth=1 2> /dev/null | sort -n'
    ################################################################

    if [ \$UID -ne 0 ]
    then
      alias reboot='sudo /sbin/reboot'
      alias apt-get='sudo apt-get'
      alias update='sudo apt update;sudo apt upgrade -y;sudo apt dist-upgrade -y;sudo apt check;sudo apt autoclean -y;sudo apt autoremove -y'
    else
      alias update='apt update;apt upgrade -y;apt dist-upgrade -y;apt check;apt autoclean -y;apt autoremove -y'      
    fi

    alias cd..='cd ..'
    alias ..='cd ..'
    alias ...='cd ../..'
    alias ....='cd ../../..'

    alias sha1='openssl sha1'
    alias diff='colordiff'
    alias showmount='mount | column -t'
    alias now='date +"%T'
    alias vi='vim'
    alias svi='sudo vim'

    alias ping='ping -c 4'
    alias fastping='ping -c 100 -s.2'

    alias ports='sudo netstat -tulanpW'

    alias http-header='curl -I'

    PS1='\[\033[1;33m\]\u\[\033[1;37m\]@\[\033[1;32m\]\h\[\033[1;37m\]:\[\033[1;31m\]\w \n\[\033[1;36m\]$ \[\033[0m\]'
    export PS1

    echo -n -e '\033%G'
    ;;
esac
EOF

ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa -N ""

cat ~/.ssh/id_rsa
rm ~/.ssh/id_rsa

mv  ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

bash
update && reboot
Copyright © 2022 by Julian Easterling. SOME RIGHTS RESERVED.
Privacy Policy              Terms of Use             


Creative Commons License
Except where otherwise noted, content on this site is
licensed under a Creative Common Attribution-Share Alike 4.0 International License.


All of the opinions expressed on this website are those of Julian Easterling and
do not represent the views of any of my current and previous clients or employers in any way.

If you notice an error on the site or content that has not been properly attributed, bring
it to my attention using the contact page and I will endeavor to fix it as soon as I can.

I accept no responsibility or liability for any damages incurred by following any of
my advice or by using any of the information on my site or of those sites that I link to.