====== Perso ======


vi /etc/update_motd.sh

<code=bash>

#! /bin/sh
upSeconds=`/usr/bin/cut -d. -f1 /proc/uptime`
secs=$(($upSeconds%60))
mins=$(($upSeconds/60%60))
hours=$(($upSeconds/3600%24))
days=$(($upSeconds/86400))
UPTIME=`printf "%d days, %02dh %02dm %02ds " "$days" "$hours" "$mins" "$secs"`

echo "\033[0;32m
.~~. .~~. \033[0;37m`date +"%A, %e %B %Y, %R"`\033[0;32m
'. \ ' ' / .' \033[0;37m`uname -srmo`\033[0;31m
.~ .~~~..~. \033[0;37m\033[0;31m
: .~.'~'.~. : \033[0;37mUptime.............: $UPTIME\033[0;31m
~ ( ) ( ) ~ \033[0;37mMemory.............: $((`cat /proc/meminfo | grep MemFree | awk {'print $2'}`/1024))MB (Free) / $((`cat /proc/meminfo | grep MemTotal | awk {'print $2'}`/1024))MB (Total)\033[0;31m
( : '~'.~.'~' : ) \033[0;37mRunning Processes..: `ps ax | wc -l | tr -d " "`\033[0;31m
~ .~ ( ) ~. ~ \033[0;37m\033[0;31m
( : '~' : ) \033[0;37mIP Addresses.......: `/sbin/ifconfig | /bin/grep "Bcast:" | /usr/bin/cut -d ":" -f 2 | /usr/bin/cut -d " " -f 1` / `wget -q -O - http://icanhazip.com/ | tail`\033[0;31m
'~ .~~~. ~' \033[0;37mTemperature........: `vcgencmd measure_temp | sed "s/temp=//"`\033[0;31m
'~' \033[0;37m" > /etc/motd

</code>


====== Logo ======

apt-get install linuxlogo
linux_logo -L14
linux_logo -L1 à linux_logo -L27 pour voir les différentes versions.

Une fois votre logo choisi, tapez la commande suivante pour l'intégrer dans votre motd.tail

linux_logo -L14 > /etc/motd

 
raspberry_pi/ssh_perso.txt · Dernière modification: 2019/05/11 14:35 (modification externe)     Haut de page