Skip to main content

Ubuntu

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

Установка необходимых пакетов

sudo apt install mlocate -y
sudo apt install net-tools -y

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

sudotee tee-a ~/update.apt.sh.bashrc << 'EOF'
#!/bin/bash# ------------------------------------------------------------------------------
# Prompt console
# ------------------------------------------------------------------------------
PS1='\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]$ '
# ------------------------------------------------------------------------------
# Bind Aliases
# ------------------------------------------------------------------------------
alias upd='sudo apt update -y && \
sudo apt-get update
sudo apt-getapt upgrade -y && \
sudo apt-getapt dist-full-upgrade -y && \
sudo apt-getapt autoremove -y && \
sudo apt autoclean -y && \
sudo updatedb sudo&& apt-get autoclean\
sudo apt-getapt check--fix-broken install'

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

source ~/.bashrc

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

sudo chmod +x ~/update.apt.sh
sudo ~/update.apt.shupd