Add system info script
This commit is contained in:
parent
5c028c7ff8
commit
3c074c8948
|
@ -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"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue