Created
March 13, 2021 14:06
-
-
Save alkarem34/2f9eca5748b303491894a002a7df737b to your computer and use it in GitHub Desktop.
Fetch system info in one line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# replace the pacman command with your distros package manager | |
# without colors | |
echo -e "$USER@`hostname`\nos `lsb_release -ds|tr -d '"'`\nkern `uname -sr`\npkgs `pacman -Qq|wc -l`\nsh $SHELL\nup `uptime -p|sed 's/^.\{3\}//'`\nfree `/bin/free -tm|awk 'NR==2{print $2"MB / "$3"MB"}'`" | |
# with colors | |
echo -e "\033[0;36m$USER@`hostname`\n\033[0;34mos \033[0;37m`lsb_release -ds|tr -d '"'`\n\033[0;34mkern \033[0;37m`uname -sr`\n\033[0;34mpkgs \033[0;37m`pacman -Qq|wc -l`\n\033[0;34msh \033[0;37m$SHELL\n\033[0;34mup \033[0;37m`uptime -p|sed 's/^.\{3\}//'`\n\033[0;34mfree \033[0;37m`/bin/free -tm|awk 'NR==2{print$2"MB / "$3"MB"}'`" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
echo -e "\033[0;36m$USER@`hostname`\n\033[0;34mos \033[0;37m`lsb_release -ds|tr -d '"'`\n\033[0;34mkern \033[0;37m`uname -sr`\n\033[0;34mpkgs \033[0;37m`pacman -Qq | wc -l`\n\033[0;34msh \033[0;37m$SHELL\n\033[0;34mup \033[0;37m`uptime -p|sed 's/^.\{3\}//'`\n\033[0;34mfree \033[0;37m`/bin/free -tm|awk 'NR==2{print $2"MB / "$3"MB"}'`\n\033[0;34mwm \033[0;37m`grep -n exec $HOME/.xinitrc | cut -d ' ' -f 2 | tail -n 1`"
with window manager