This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tips:ubuntu:locale [2016/12/23 08:40] – scipio | tips:ubuntu:locale [2018/02/08 17:12] (current) – scipio | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| <code bash> | <code bash> | ||
| apt install -y curl && \ | apt install -y curl && \ | ||
| - | curl -s " | + | curl -s " |
| </ | </ | ||
| <file bash script> | <file bash script> | ||
| apt remove -y unattended-upgrades | apt remove -y unattended-upgrades | ||
| - | apt install -y tmux | ||
| locale-gen it_IT.UTF-8 | locale-gen it_IT.UTF-8 | ||
| locale-gen en_US.UTF-8 | locale-gen en_US.UTF-8 | ||
| update-locale LANG=it_IT.UTF-8 LC_MESSAGES=POSIX | update-locale LANG=it_IT.UTF-8 LC_MESSAGES=POSIX | ||
| + | timedatectl set-timezone Europe/Rome | ||
| grep -q menu-complete / | grep -q menu-complete / | ||
| Line 25: | Line 25: | ||
| fi | fi | ||
| - | [ ! -f / | + | # disable automatic updates |
| + | cat > / | ||
| + | APT:: | ||
| + | APT:: | ||
| + | EOF4 | ||
| + | |||
| + | |||
| + | [ -f / | ||
| cat > / | cat > / | ||
| Line 64: | Line 71: | ||
| alias sud=" | alias sud=" | ||
| alias llast=" | alias llast=" | ||
| - | alias update="sudo apt-get update; sudo apt-get -y -V upgrade" | + | alias upgrade="sudo apt-get update; sudo apt-get -y -V upgrade" |
| EOF | EOF | ||
| + | mkdir -p /root/.ssh | ||
| + | cat > / | ||
| + | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9UlZrT3Yy1xkLAc1iy6SgUXd1zIQYjE6WQ2Ww2ncZEjLoic0qUikaHjoaN2Ci1Fx0EEfU9Kbt0aglyMsK724n2qnzrNHUUNq4yGsPjA8eAHOPDujGpnwShUTagREC8G5lmDRJoq6+23wOkPGyTyO3WJ90V+oNMoarkkT9ycmMbrmtWIowTcse86l69uHPmUrpD5H0Z2y73syvLA94uqo/ | ||
| + | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJ/ | ||
| + | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDB+fNi5wEoBUWuBlmD2+/ | ||
| + | |||
| + | EOF | ||
| - | curl -s " | ||
| + | curl -s " | ||
| update-alternatives --set editor / | update-alternatives --set editor / | ||
| + | [ -d /etc/cloud ] && echo " | ||
| + | [ -d /etc/cloud ] && perl -pi -e " | ||
| </ | </ | ||
| Line 93: | Line 109: | ||
| esac | esac | ||
| - | if [ " | + | PS1=' |
| - | | + | |
| - | else | + | |
| - | PS1=' | + | |
| - | fi | + | |
| unset color_prompt force_color_prompt | unset color_prompt force_color_prompt | ||
| - | |||
| - | # If this is an xterm set the title to user@host: | ||
| - | case " | ||
| - | xterm*|rxvt*) | ||
| - | PS1=" | ||
| - | ;; | ||
| - | *) | ||
| - | ;; | ||
| - | esac | ||
| # enable color support of ls and also add handy aliases | # enable color support of ls and also add handy aliases | ||
| Line 118: | Line 121: | ||
| fi | fi | ||
| - | if [ -f ~/.aliases ]; then | + | [ -f ~/.aliases ] && |
| - | | + | [ -f ~/ |
| - | fi | + | |
| if [ -f / | if [ -f / | ||
| . / | . / | ||
| fi | fi | ||
| + | |||
| + | # run TMUX | ||
| + | [[ $- != *i* ]] && return | ||
| + | |||
| + | if which tmux >/ | ||
| + | if [[ -z " | ||
| + | ID=" | ||
| + | if [[ -z " | ||
| + | tmux new-session | ||
| + | else | ||
| + | tmux attach-session -t " | ||
| + | fi | ||
| + | fi | ||
| + | fi | ||
| + | ### NOTHING BELOW ### | ||
| + | |||
| </ | </ | ||
| + | < | ||
| + | mkdir -p /root/.ssh | ||
| + | cat > / | ||
| + | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9UlZrT3Yy1xkLAc1iy6SgUXd1zIQYjE6WQ2Ww2ncZEjLoic0qUikaHjoaN2Ci1Fx0EEfU9Kbt0aglyMsK724n2qnzrNHUUNq4yGsPjA8eAHOPDujGpnwShUTagREC8G5lmDRJoq6+23wOkPGyTyO3WJ90V+oNMoarkkT9ycmMbrmtWIowTcse86l69uHPmUrpD5H0Z2y73syvLA94uqo/ | ||
| + | |||
| + | EOF | ||
| + | </ | ||
| + | < | ||
| + | sudo apt install -y curl && \ | ||
| + | curl -s " | ||
| + | </ | ||