I have certain paths, which are too long to type, so I need to wrap all those in one script as alias and source that script to my existing package code.
These should set alias permanently over that server or over the package, so every user can use the alias instead typing the whole path.
alias bc='bc -l'
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias grep='grep --color'
alias update='yum update'
alias update='yum -y update'
I have tried this but it isn't working.
Old thread, but I figured out what to do using the great post from Shivams. The following is step by step of what I did on Raspberry Pi:
sudo nano /etc/bash.bashrc
Add the aliases to the bottom, you can keep comments to be useful, such as:
alias ll="ls -al" #Adds alias for ll to show all files and folders
alias cls="clear" #Adds alias for cls to clear screen
alias temp="vcgencmd measure_temp" #Get the system temperature
Ctrl+s to save, then then Ctrl+x to exit
They won't work for your current session, so log off the terminal and back in.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With