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:37] – 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 56: | Line 63: | ||
| EOF | EOF | ||
| - | cat > /root/.bashrc | + | |
| + | cat > /root/.aliases | ||
| + | alias l="ls -alh --color" | ||
| + | alias ll="ls -alh --color" | ||
| + | alias lle=" | ||
| + | alias s="ssh -l root" | ||
| + | alias sud=" | ||
| + | alias llast=" | ||
| + | alias upgrade=" | ||
| + | EOF | ||
| + | |||
| + | mkdir -p / | ||
| + | cat > / | ||
| + | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9UlZrT3Yy1xkLAc1iy6SgUXd1zIQYjE6WQ2Ww2ncZEjLoic0qUikaHjoaN2Ci1Fx0EEfU9Kbt0aglyMsK724n2qnzrNHUUNq4yGsPjA8eAHOPDujGpnwShUTagREC8G5lmDRJoq6+23wOkPGyTyO3WJ90V+oNMoarkkT9ycmMbrmtWIowTcse86l69uHPmUrpD5H0Z2y73syvLA94uqo/ | ||
| + | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJ/ | ||
| + | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDB+fNi5wEoBUWuBlmD2+/ | ||
| + | |||
| + | EOF | ||
| + | |||
| + | |||
| + | curl -s " | ||
| + | |||
| + | update-alternatives --set editor / | ||
| + | |||
| + | [ -d /etc/cloud ] && echo " | ||
| + | [ -d /etc/cloud ] && perl -pi -e " | ||
| + | </ | ||
| + | |||
| + | <file txt / | ||
| # If not running interactively, | # If not running interactively, | ||
| [ -z " | [ -z " | ||
| Line 74: | 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 99: | Line 121: | ||
| fi | fi | ||
| - | if [ -f ~/.aliases ]; then | + | [ -f ~/.aliases ] && |
| - | | + | [ -f ~/ |
| - | fi | + | |
| if [ -f / | if [ -f / | ||
| . / | . / | ||
| fi | fi | ||
| - | EOF | ||
| - | cat > / | + | # run TMUX |
| - | alias l=" | + | [[ $- != *i* ]] && return |
| - | alias ll="ls -alh --color" | + | |
| - | alias lle=" | + | |
| - | alias s="ssh -l root" | + | |
| - | alias sud=" | + | |
| - | alias llast=" | + | |
| - | alias update=" | + | |
| - | EOF | + | |
| + | 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 | |
| - | update-alternatives --set editor | + | cat > /root/.ssh/ |
| + | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9UlZrT3Yy1xkLAc1iy6SgUXd1zIQYjE6WQ2Ww2ncZEjLoic0qUikaHjoaN2Ci1Fx0EEfU9Kbt0aglyMsK724n2qnzrNHUUNq4yGsPjA8eAHOPDujGpnwShUTagREC8G5lmDRJoq6+23wOkPGyTyO3WJ90V+oNMoarkkT9ycmMbrmtWIowTcse86l69uHPmUrpD5H0Z2y73syvLA94uqo/ | ||
| + | |||
| + | EOF | ||
| </ | </ | ||
| + | < | ||
| + | sudo apt install -y curl && \ | ||
| + | curl -s " | ||
| + | </ | ||