Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung |
links:console [2017/10/22 20:55] – butzel | links:console [2019/02/02 22:27] (aktuell) – adlerweb |
---|
=== Konsolenspielereien === | === Konsolenspielereien === |
* [[http://wttr.in/| curl wttr.in]] aktueller Wetterbericht in der Console | |
* [[http://wttr.in/moon| curl wttr.in/moon]] Mondphase | |
* [[telnet://india.colorado.edu:13| netcat -C india.colorado.edu 13]] Uhrzeit | |
* [[telnet://rainmaker.wunderground.com| netcat -C rainmaker.wunderground.com 23]] US-Wetter-"Service" | |
| |
* [[telnet://telehack.com|netcat -C telehack.com 23]] "W0PR?" | * [[http://wttr.in/|curl wttr.in]] aktueller Wetterbericht in der Console |
* [[telnet://freechess.org:5000|netcat -C freechess.org 5000]] "Wouldn't you prefer a good game of chess?" | * [[http://wttr.in/moon|curl wttr.in/moon]] Mondphase |
| * [[:links:netcat_-c_india.colorado.edu_13|netcat -C india.colorado.edu 13]] Uhrzeit |
| * [[:links:netcat_-c_rainmaker.wunderground.com_23|netcat -C rainmaker.wunderground.com 23]] US-Wetter-"Service" |
| |
* [[telnet://towel.blinkenlights.nl| netcat -C towel.blinkenlights.nl 23 ]] Star Wars IV | * [[:links:netcat_-c_telehack.com_23|netcat -C telehack.com 23]] "W0PR?" |
* [[telnet://towel.blinkenlights.nl:666| netcat -C towel.blinkenlights.nl 666 ]] Ausreden vom [[http://rrzs42.uni-regensburg.de/edmund/operator/|Bastard Operator from Hell]] | * [[:links:netcat_-c_freechess.org_5000|netcat -C freechess.org 5000]] "Wouldn't you prefer a good game of chess?" |
* [[telnet://mtrek.com:1701| netcat -C mtrek.com 1701]] StarTrek | |
* [[telnet://1984.ws| telnet 1984.ws]] use ssh big brother is watching you | * [[:links:netcat_-c_towel.blinkenlights.nl_23|netcat -C towel.blinkenlights.nl 23]] Star Wars IV |
* [[telnet://bbs.armageddonbbs.com |nc -C bbs.armageddonbbs.com 23]] " Hermes II BBS " | * [[:links:netcat_-c_towel.blinkenlights.nl_666|netcat -C towel.blinkenlights.nl 666]] Ausreden vom [[http://rrzs42.uni-regensburg.de/edmund/operator/|Bastard Operator from Hell]] |
| * [[:links:netcat_-c_mtrek.com_1701|netcat -C mtrek.com 1701]] StarTrek |
| * [[:links:telnet_1984.ws|telnet 1984.ws]] use ssh big brother is watching you |
| * [[:links:nc_-c_bbs.armageddonbbs.com_23|nc -C bbs.armageddonbbs.com 23]] " Hermes II BBS " |
| * finger Koblenz@graph.no - Wetterbericht für Koblenz |
| * finger news@graph.no - latest headlines from NRK |
| * finger time@graph.no - server local time |
| * finger date@graph.no - server local date |
| * telnet mapscii.me |
| |
===== Bash-Logins ===== | ===== Bash-Logins ===== |
| |
| |
==== PROMPT ==== | ==== PROMPT ==== |
| |
[UHRZEIT@PFAD:RETURNVALUE] | [UHRZEIT@PFAD:RETURNVALUE] |
| |
<code bash> | <code bash> |
#PS1="\[\033[0;31m\]\A \[\033[0;34m\][\W] \[\033[0;32m\] \$? :\[\033[0m\]" | #PS1="[033[0;31m]A [033[0;34m\][\W] [033[0;32m\] \$? :[033[0m\]" |
#PS1="\[\033[0;31m\]\A \[\033[0;35m\][\[\033[0;34m\]\W\[\033[0;35m\]]\[\033[0;32m\] \$? \[\033[0;35m\]:\[\033[0m\]" | #PS1="[033[0;31m]A [033[0;35m\][[033[0;34m]W[033[0;35m\|]][033[0;32m\] \$? [033[0;35m\]:[033[0m\]" |
export PS1="[\[\033[38;5;1m\]\t\[$(tput sgr0)\]\[\033[38;5;11m\]@\[$(tput sgr0)\]\[\033[38;5;4m\]\W\[$(tput sgr0)\]\[\033[38;5;11m\]:\[$(tput sgr0)\]\[\033[38;5;2m\]\$?\[$(tput sgr0)\]\[\033[38;5;15m\]\[$(tput sgr0)\]] " | export PS1="[[033[38;5;1m]t\[$(tput sgr0)][\033[38;5;11m\]@\[$(tput sgr0)][\033[38;5;4m]W\[$(tput sgr0)][\033[38;5;11m\]:\[$(tput sgr0)][\033[38;5;2m]$?\[$(tput sgr0)][\033[38;5;15m][$(tput sgr0)\|]] " |
</code> | </code> |
| |
<code bash .bashrc> | .bashrc |
| |
| <code bash> |
PATH=$HOME/bin:$PATH | PATH=$HOME/bin:$PATH |
export PATH | export PATH |
| |
#Verwendete Farben | #Verwendete Farben |
ROT="\[\033[0;31m\]" | ROT="[033[0;31m\]" |
GRU="\[\033[0;32m\]" | GRU="[033[0;32m\]" |
BLU="\[\033[1;34m\]" | BLU="[033[1;34m\]" |
WHI="\[\033[0m\]" | WHI="[033[0m\]" |
LIL="\[\033[0;35m\]" | LIL="[033[0;35m\]" |
ORA="\[\033[0;33m\]" | ORA="[033[0;33m\]" |
GRY="\[\033[0;37m\]" | GRY="[033[0;37m\]" |
#TUX='\ue000' | #TUX='\ue000' |
#GLIDER='\n\u2840\u2841\u2842' | #GLIDER='\n\u2840\u2841\u2842' |
| |
# time@[retval]:directory# | # time@[retval]:directory# |
## 13:37:00@[0]:dir$ | ## 13:37:00@[0]:dir$ |
PS1="$ROT\t$LIL@$GRU[\$?]$LIL:$BLU\W$LIL\$ $WHI " | PS1="$ROT\t$LIL@$GRU[\$?]$LIL:$BLU\W$LIL\$ $WHI " |
| |
# user@[[retval]]:directory# | # user@[[retval|]]:directory# |
## tux@[[0]]:dir$ | ## tux@[[0|]]:dir$ |
PS1="$ROT\u$LIL@$GRU[[\$?]]$LIL:$BLU\W$LIL\4$WHI " | PS1="$ROT\u$LIL@$GRU[[\$|]]$LIL:$BLU\W$LIL\4$WHI " |
| |
# user@hostname:fullpath (retval) | # user@hostname:fullpath (retval) |
# tux@computer:~/dir (0) | # tux@computer:~/dir (0) |
PS1="$ROT\u$LIL@$GRU\h$LIL:$BLU\w $LIL(\$?)$WHI " | PS1="$ROT\u$LIL@$GRU\h$LIL:$BLU\w $LIL(\$?)$WHI " |
| |
# user@hostname:fullpath (retal) | # user@hostname:fullpath (retal) |
## tux@computer:dir (0) | ## tux@computer:dir (0) |
PS1="$LIL[$ORA\t$LIL]($ORA\$?$LIL):$GRY$_\n$ROT\u$LIL@$GRU\h$LIL:$BLU\W$WHI " | PS1="$LIL[$ORA\t$LIL]($ORA\$?$LIL):$GRY$_\n$ROT\u$LIL@$GRU\h$LIL:$BLU\W$WHI " |
| |
# ⡀⡁⡂ [time] retval: last command | # ⡀⡁⡂ [time] retval: last command |
# user@computer:directory | # user@computer:directory |
## ⡀⡁⡂ [13:37:42] 0: history -d | ## ⡀⡁⡂ [13:37:42] 0: history -d |
## tux@computer:dir | ## tux@computer:dir |
PS1=$'\n\u2840\u2841\u2842 \[\033[0;35m\][\[\033[0;33m\]\\t\[\033[0;35m\]] \[\033[0;33m\]$?\[\033[0;35m\]:\[\033[0;37m\] $(history|tail -n1| sed -e "s/[0-9 ]*//"|cut -c1-55) \n\[\033[0;31m\]\u\[\033[0;35m\]@\[\033[0;32m\]\h\[\033[0;35m\]:\[\033[1;34m\]\W\[\033[0m\] ' | PS1=$'\n\u2840\u2841\u2842 [033[0;35m\][[033[0;33m]\t[033[0;35m\|]] [033[0;33m\]$?[033[0;35m\]:[033[0;37m\] $(history|tail -n1| sed -e "s/[0-9 ]*//"|cut -c1-55) \n[033[0;31m]u[033[0;35m\]@[033[0;32m]h[033[0;35m\]:[033[1;34m]W[033[0m\] ' |
| |
## Rot für root und grün für user: | ## Rot für root und grün für user: |
if [[ $(id -u) -ne 0 ]] ; then | if [[ $(id -u) -ne 0 |]] ; then |
PS1=$'\[\033[1;32m\]\n \u2840\u2841\u2842 \[\033[0;35m\][\[\033[0;33m\]\\t\b\b\b\[\033[0;35m\]] \[\033[1;35m\]$?\[\033[0;35m\]=\[\033[0;37m\]$(history|tail -n1| sed -e "s/[0-9 ]*//"|cut -c1- | PS1=$'[033[1;32m]n \u2840\u2841\u2842 [033[0;35m\][[033[0;33m]\t\b\b\b[033[0;35m\|]] [033[1;35m\]$?[033[0;35m\]=[033[0;37m\]$(history|tail -n1| sed -e "s/[0-9 ]*//"|cut -c1- |
55) \n\[\033[0;31m\]\u\[\033[0;35m\]@\[\033[0;32m\]\h\[\033[0;35m\]:\[\033[1;34m\]\W\[\033[1;33m\]\ue000\[\033[0m\]' | 55) \n[033[0;31m]u[033[0;35m\]@[033[0;32m]h[033[0;35m\]:[033[1;34m]W[033[1;33m]ue000[033[0m\]' |
else | else |
PS1=$'\[\033[1;31m\]\n \u2840\u2841\u2842 \[\033[0;35m\][\[\033[0;33m\]\\t\b\b\b\[\033[0;35m\]] \[\033[1;33m\]$?\[\033[0;35m\]=\[\033[0;37m\]$(history|tail -n1| sed -e "s/[0-9 ]*//"|cut -c1-55) \n\[\033[0;31m\]\u\[\033[0;35m\]@\[\033[0;32m\]\h\[\033[0;35m\]:\[\033[1;34m\]\W\[\033[0m\] ' | PS1=$'[033[1;31m]n \u2840\u2841\u2842 [033[0;35m\][[033[0;33m]\t\b\b\b[033[0;35m\|]] [033[1;33m\]$?[033[0;35m\]=[033[0;37m\]$(history|tail -n1| sed -e "s/[0-9 ]*//"|cut -c1-55) \n[033[0;31m]u[033[0;35m\]@[033[0;32m]h[033[0;35m\]:[033[1;34m]W[033[0m\] ' |
fi | fi |
| |
| |
export PS1 | export PS1 |
| |
==== Thinkpad Logo ==== | ==== Thinkpad Logo ==== |
gewünschtes Script einfach in der .bashrc aufrufen oder gleich einfügen | |
{{ code:bash:ibmlogoontuxpad.png?direct&200|}} | gewünschtes Script einfach in der .bashrc aufrufen oder gleich einfügen [[:code:bash:ibmlogoontuxpad.png?media=code:bash:ibmlogoontuxpad.png|{{ :code:bash:ibmlogoontuxpad.png?nolink&200}}]] |
<code bash> | <code bash> |
#!/bin/sh | #!/bin/sh |
echo $ROT " IIIIIIIIII" $GRU " BBBBBBBBBB " $BLU " MMM M MMM" | echo $ROT " IIIIIIIIII" $GRU " BBBBBBBBBB " $BLU " MMM M MMM" |
echo $ROT " IIIIIIIIII" $GRU " BBBBBBBBB " $BLU " MMM MMM" | echo $ROT " IIIIIIIIII" $GRU " BBBBBBBBB " $BLU " MMM MMM" |
echo $WHI " ThinkPad " | echo $WHI " ThinkPad " |
ROT="\[\033[0;31m\]" | ROT="[033[0;31m\]" |
GRU="\[\033[0;32m\]" | GRU="[033[0;32m\]" |
BLU="\[\033[0;34m\]" | BLU="[033[0;34m\]" |
WHI="\[\033[0m\]" | WHI="[033[0m\]" |
export PS1="$ROT\u$WHI@$GRU\h$WHI:$BLU\w$WHI\$ " | export PS1="$ROT\u$WHI@$GRU\h$WHI:$BLU\w$WHI\$ " |
</code> | </code> |
| |
==== ASCII-Tux Logon ==== | ==== ASCII-Tux Logon ==== |
| |
<code bash> | <code bash> |
#!/bin/bash | #!/bin/bash |
# Zwinkernder Tux | # Zwinkernder Tux |
# Twinker Tux | # Twinker Tux |
# Copyleft: Butzel | # Copyleft: Butzel |
# License: GPLv3 | # License: GPLv3 |
WLAN_DEVICE="wlp2s0b1" | WLAN_DEVICE="wlp2s0b1" |
ETH0_DEVICE="eth0" | ETH0_DEVICE="eth0" |
ETH0_IP4="$(ip addr | grep -A 1 $ETH0_DEVICE| grep inet | cut -f 1 -d 'b'| cut -f 2 -d t | head -n 2|tr '\n' ' ' )" | ETH0_IP4="$(ip addr | grep -A 1 $ETH0_DEVICE| grep inet | cut -f 1 -d 'b'| cut -f 2 -d t | head -n 2|tr '\n' ' ' )" |
ETH0_IP6="$(ip addr | grep -A 1 $ETH0_DEVICE| grep inet6 | cut -f 1 -d 's'| cut -f 2 -d t )" | ETH0_IP6="$(ip addr | grep -A 1 $ETH0_DEVICE| grep inet6 | cut -f 1 -d 's'| cut -f 2 -d t )" |
CPU_INFO="$( cat /proc/cpuinfo | grep model\ name | sort -u | cut -f2 -d: )" | CPU_INFO="$( cat /proc/cpuinfo | grep model |
| name | sort -u | cut -f2 -d: )" |
MEM_INFO="$( cat /proc/meminfo | grep MemTotal | cut -d: -f 2 | tr -d " " )" | MEM_INFO="$( cat /proc/meminfo | grep MemTotal | cut -d: -f 2 | tr -d " " )" |
MEM_FREE="$( cat /proc/meminfo | grep MemAvail | cut -d: -f 2 | tr -d " " )" | MEM_FREE="$( cat /proc/meminfo | grep MemAvail | cut -d: -f 2 | tr -d " " )" |
WLAN_ID="$CLR_BLUE ~ hidden? ~" | WLAN_ID="$CLR_BLUE ~ hidden? ~" |
fi | fi |
clear | clear |
echo -ne $CLR_GRAY | echo -ne $CLR_GRAY |
echo -e " a8888b. \t$CLR_GRAY" | echo -e " a8888b. \t$CLR_GRAY" |
echo -e " d888888b. \t$CLR_PURPLE Hostname:$CLR_GRAY" | echo -e " d888888b. \t$CLR_PURPLE Hostname:$CLR_GRAY" |
echo -e " 8$CLR_WHITEP\"YP\"\\$CLR_GRAY88 \t $CLR_GRE3N$(hostname).$CLR_GREEN$(hostname -d 2>/dev/null)$CLR_GRAY" | echo -e " 8$CLR_WHITEP\"YP\"\\$CLR_GRAY88 \t $CLR_GRE3N$(hostname).$CLR_GREEN$(hostname -d 2>/dev/null)$CLR_GRAY" |
echo -e " 8$CLR_WHITE|0||0|$CLR_GRAY88 \t$CLR_GRAY" | echo -e " 8$CLR_WHITE|0||0|$CLR_GRAY88 \t$CLR_GRAY" |
echo -e " 8$CLR_YELLOW' .$CLR_GRAY88 \t$CLR_PURPLE Processor:$CLR_GRAY" | echo -e " 8$CLR_YELLOW' .$CLR_GRAY88 \t$CLR_PURPLE Processor:$CLR_GRAY" |
echo -e " 8a. : [33m_[37ma88P \t $CLR_GRE3N$ETH0_IP4$CLR_GRAY" | echo -e " 8a. : [33m_[37ma88P \t $CLR_GRE3N$ETH0_IP4$CLR_GRAY" |
echo -e " $CLR_BROWN._/\"\\[37mYaa_: $CLR_BROWN.|\`[37m88P$CLR_BROWN| \t$CLR_GRAY" | echo -e " $CLR_BROWN._/\"\\[37mYaa_: $CLR_BROWN.|\`[37m88P$CLR_BROWN| \t$CLR_GRAY" |
echo -e " $CLR_BROWN\\ \\[37mYP\" $CLR_BROWN \`|$CLR_GRAY 8P $CLR_BROWN \`.\t$CLR_PURPLE WirelessLan:$CLR_GRAY" | echo -e " $CLR_BROWN\ |
| \\[37mYP\" $CLR_BROWN \`|$CLR_GRAY 8P $CLR_BROWN \`.\t$CLR_PURPLE WirelessLan:$CLR_GRAY" |
echo -e " $CLR_BROWN/ \\[37m.___.d$CLR_BROWN| .' \t $CLR_GREEN$WLAN_ID$CLR_GRAY" | echo -e " $CLR_BROWN/ \\[37m.___.d$CLR_BROWN| .' \t $CLR_GREEN$WLAN_ID$CLR_GRAY" |
echo -e " $CLR_BROWN\`--..__)[37m.8888P$CLR_BROWN\`._.' \t $CLR_GRE3N$WLAN_IP4$CLR_GRAY" | echo -e " $CLR_BROWN\`--..__)[37m.8888P$CLR_BROWN\`._.' \t $CLR_GRE3N$WLAN_IP4$CLR_GRAY" |
ROT="\[\033[0;31m\]" | ROT="[033[0;31m\]" |
GRU="\[\033[0;32m\]" | GRU="[033[0;32m\]" |
BLU="\[\033[1;34m\]" | BLU="[033[1;34m\]" |
WHI="\[\033[0m\]" | WHI="[033[0m\]" |
LIL="\[\033[0;35m\]" | LIL="[033[0;35m\]" |
PS1="$ROT\u$LIL@$GRU\h$LIL:$BLU\W$LIL#$WHI " | PS1="$ROT\u$LIL@$GRU\h$LIL:$BLU\W$LIL#$WHI " |
export PS1 | export PS1 |
</code> | </code> |
| |
| |