"Colorful Command Line: How to Add lolcat to Your Linux Commands"



1. Edit your shell configuration file:

nano ~/.bashrc

 # or 

nano ~/.zshrc

2.Add the functions: Append the following lines to your configuration file. These functions will wrap the commands and pipe their output through lolcat:

function lolcat_wrapper() {

    command "$@" | lolcat

}


alias ls='lolcat_wrapper ls'

alias cat='lolcat_wrapper cat'

alias echo='lolcat_wrapper echo'

alias grep='lolcat_wrapper grep'

alias tail='lolcat_wrapper tail'

alias head='lolcat_wrapper head'

alias dmesg='lolcat_wrapper dmesg'

alias df='lolcat_wrapper df'

alias du='lolcat_wrapper du'

alias free='lolcat_wrapper free'

alias ps='lolcat_wrapper ps'

alias top='lolcat_wrapper top'

alias htop='lolcat_wrapper htop'

alias ifconfig='lolcat_wrapper ifconfig'

alias ip='lolcat_wrapper ip'

alias ping='lolcat_wrapper ping'

alias traceroute='lolcat_wrapper traceroute'

alias uptime='lolcat_wrapper uptime'

alias who='lolcat_wrapper who'

alias whoami='lolcat_wrapper whoami'

alias w='lolcat_wrapper w'

alias uname='lolcat_wrapper uname -a'

alias history='lolcat_wrapper history'

alias chmod='lolcat_wrapper chmod'

alias chown='lolcat_wrapper chown'

alias mkdir='lolcat_wrapper mkdir'

alias rmdir='lolcat_wrapper rmdir'

alias rm='lolcat_wrapper rm'

alias cp='lolcat_wrapper cp'

alias mv='lolcat_wrapper mv'

alias find='lolcat_wrapper find'

alias locate='lolcat_wrapper locate'

alias less='lolcat_wrapper less'

alias more='lolcat_wrapper more'

alias tar='lolcat_wrapper tar'

alias gzip='lolcat_wrapper gzip'

alias gunzip='lolcat_wrapper gunzip'

alias zip='lolcat_wrapper zip'

alias unzip='lolcat_wrapper unzip'

alias wget='lolcat_wrapper wget'

alias curl='lolcat_wrapper curl'

alias ssh='lolcat_wrapper ssh'

alias scp='lolcat_wrapper scp'

alias rsync='lolcat_wrapper rsync'

alias journalctl='lolcat_wrapper journalctl'

alias systemctl='lolcat_wrapper systemctl'

alias service='lolcat_wrapper service'

alias man='lolcat_wrapper man'

alias apt='lolcat_wrapper apt'

alias apt-get='lolcat_wrapper apt-get'

alias yum='lolcat_wrapper yum'

alias dnf='lolcat_wrapper dnf'

alias pacman='lolcat_wrapper pacman'

alias zypper='lolcat_wrapper zypper'

alias brew='lolcat_wrapper brew'


3.Source the configuration file: After adding the functions and aliases, source the file to apply the changes immediately:
source ~/.bashrc
# or
source ~/.zshrc

#customization
#Linux #CommandLine #Terminal #LinuxCommands #Lolcat #TechTips #Coding #Programming #Unix #DevLife #OpenSource #TechTutorial #GeekLife #CodingTips #ShellScripting #LinuxTutorial #TerminalCustomization #FunWithCode #ColorfulCoding #TechBlog




Comments

Popular posts from this blog

Linux Commands part - 2