Update OS

Ubuntu

Обновление Ubuntu OS                                                                                                                               

Настройка Алиасов

sudo apt install mlocate -y
tee -a ~/.bashrc << 'EOF'
# ------------------------------------------------------------------------------
# Prompt console
# ------------------------------------------------------------------------------
PS1='\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]$ '
# ------------------------------------------------------------------------------
# Bind Aliases
# ------------------------------------------------------------------------------
alias upd='
sudo apt update && \
sudo DEBIAN_FRONTEND=noninteractive apt full-upgrade -y \
  -o Dpkg::Options::="--force-confdef" \
  -o Dpkg::Options::="--force-confold"
sudo apt --fix-broken install -y
sudo apt autoremove -y
sudo apt autoclean -y
sudo apt-get check
sudo updatedb'

alias hclean='cat /dev/null > ~/.bash_history && history -c'
# ------------------------------------------------------------------------------
EOF

source ~/.bashrc

Запуск обноления

upd

Astra

Обновление Astra OS                                                                                                                                   

Настройка Алиасов

tee -a ~/.bashrc << 'EOF'
# ------------------------------------------------------------------------------
# Prompt console
# ------------------------------------------------------------------------------
PS1='\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]$ '
# ------------------------------------------------------------------------------
# Bind Aliases
# ------------------------------------------------------------------------------
alias upd='
sudo apt update && \
sudo DEBIAN_FRONTEND=noninteractive apt install astra-update -y && \
sudo DEBIAN_FRONTEND=noninteractive astra-update -A -r -T
sudo apt --fix-broken install -y
sudo apt autoremove -y
sudo apt autoclean
sudo apt-get check
sudo updatedb'

alias l='ls -l'
alias ll='ls -la'
alias hclean='cat /dev/null > ~/.bash_history && history -c && exit'
# ------------------------------------------------------------------------------
EOF

source ~/.bashrc

Запуск обновления

sudo apt install -y mlocate
upd

Centos/Red Hat

Обновление Centos/Red Hat OS                                                                                                                

Настройка Алиасов

tee -a ~/.bashrc << 'EOF'
# ------------------------------------------------------------------------------
# Prompt console
# ------------------------------------------------------------------------------
PS1='\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]$ '
# ------------------------------------------------------------------------------
# Bind Aliases
# ------------------------------------------------------------------------------
alias upd='
sudo yum makecache && \
sudo yum update -y
sudo yum autoremove -y
sudo yum clean all
sudo updatedb
sudo needs-restarting -r'

alias hclean='cat /dev/null > ~/.bash_history && history -c'
# ------------------------------------------------------------------------------
EOF

source ~/.bashrc

Запуск обновления

upd

SUSE

Обновление SUSE OS                                                                                                                                 

Создание скрипта

tee -a ~/.bashrc << 'EOF'
# ------------------------------------------------------------------------------
# Prompt console
# ------------------------------------------------------------------------------
PS1='\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]$ '
# ------------------------------------------------------------------------------
# Bind Aliases
# ------------------------------------------------------------------------------
alias upd='
sudo zypper --non-interactive refresh && \
sudo zypper --non-interactive verify && \
sudo zypper --non-interactive list-updates --all && \
sudo zypper --non-interactive dup --auto-agree-with-licenses --allow-vendor-change
sudo zypper --non-interactive clean --all
sudo zypper ps -s
sudo updatedb'

alias hclean='cat /dev/null > ~/.bash_history && history -c'
# ------------------------------------------------------------------------------
EOF

source ~/.bashrc

Запуск обноления

upd