The alias command allows you to create command shortcuts within your shell. Below shows you how,
move to your home directory,
[[email protected] ~]# cd ~
add the alias of os which will show the output of ‘uname -a’
[[email protected] ~]# cat >> .bash_profile
[[email protected] ~]# alias os=’uname -a’
Reload you environment variables for your new alias to take effect
[[email protected] ~]# . .bash_profile
Test your new alias
[[email protected] ~]# os
Linux localhost.localdomain 2.6.18-92.1.6.el5PAE #1 SMP Fri Jun 20 02:51:01 EDT 2008 i686 i686 i386 GNU/Linux
- How to Configure a BIND Server on Ubuntu - March 15, 2018
- What is a BGP Confederation? - March 6, 2018
- Cisco – What is BGP ORF (Outbound Route Filtering)? - March 5, 2018
Want to become a Linux expert?
Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial