![]() If you enable hushed mode login, the answers in the previous solution's will not work. Oracle user does not exist on have not yet enabled hushed mode as I see. Disk Usage >80%-įilesystem Size Used Avail Use Mounted on Processor Name: Intel(R) Core(TM) i7-6700HQ CPU 2.60GHz You may have seen an output like the one below when running the above “source” command.įrom next time on-wards, you will get this information every time you log into the shell.Īlternatively, you can manually run this script at any time if you need to. Run the following command to take this change effect. # echo "/root/system-info.sh" > ~root/.profile To take this change effect, run the following command.įor Debian-based systems, you may need to add a file path to the “.profile” file. # echo "/root/system-info.sh" > ~root/.bash_profile When the script is ready, add the file path at the end of the “.bash_profile” file in RHEL-based systems CentOS, Oracle Linux and Fedora. Set the executable permission for the “system-info.sh” file. ![]() Once the above script is added to a file. Yum updateinfo summary | grep 'Security|Bugfix|Enhancement'Įcho -e "-"Ĭat /var/lib/update-notifier/updates-available If (( $(cat /etc/*-release | grep -w "Oracle|Red Hat|CentOS|Fedora" | wc -l) > 0 ))Įcho -e "-Package Updates-" Vserver=$(lscpu | grep Hypervisor | wc -l)Įcho -e "-Oracle DB Instances-"Įcho "oracle user does not exist on $(hostname)" #vi /opt/scripts/system-info.shĮcho -e "-System Information-"Įcho -e "uptime:\t\t\t"`uptime | awk ''Įcho -e "-For WWN Details-" This basic script will bring the system information to your terminal whenever you log into the shell. If anyone wants to add any other information in the script, please let us know your requirements in the comment section so that we can help you.īash Script to View System Information on Linux Every Time You Log into the Shell
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |