Add system info script

This commit is contained in:
JaydenMW 2021-03-09 20:39:40 +00:00
parent 5c028c7ff8
commit 3c074c8948
1 changed files with 26 additions and 0 deletions

26
system-info.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
# JaydenMW -- Project
# Language: Bash
# License: NONE
# This is a script I wrote that prints out system information
DISTRIB=$(cat /etc/issue.net) # Finds what distribution is ran
KERN=$(uname -sr) # Finds out what kernel is in use
MEM=$(cat /proc/meminfo | grep MemTotal) # Finds memory information
UPT=$(uptime -p) # Finds system uptime
USR=$(whoami) # Finds username
CURRENT_SHELL=$(ps -p $$ | grep -E -x 'zsh|sh|bash|csh|dash') # Finds Shell
echo ""
echo "Note: This script won't work with: *BSD, Windows*"
echo "Note: This script should work with the fallowing: Gentoo, MacOS* BUT these Operating Systems have not been tested and may not work"
echo ""
echo "OS: $DISTRIB"
echo "UPTIME: $UPT"
echo "KERNEL: $KERN"
echo "MEMORY: $MEM"
echo "USER: $USR"
echo "SHELL: $CURRENT_SHELL"