Debian: Difference between revisions

From Andreida
Line 24: Line 24:


=== upgrade Debian to the next major version ===
=== upgrade Debian to the next major version ===

* update the system
==== 8 -> 9 (jessie -> stretch) ====
apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade
cat /etc/issue
* boot your system
apt-get update
apt-get upgrade
apt-get dist-upgrade
sed -i 's/jessie/stretch/g' /etc/apt/sources.list
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get -y autoremove
shutdown -r now
shutdown -r now
* Check your current major version number
cat /etc/issue
cat /etc/issue

* Goto https://www.debian.org/releases/ and get the names for your current version and the version you want to change to
==== 9 -> 10 (stretch -> buster) ====
9 Stretch
cat /etc/issue
10 Buster
apt-get update
* change the old string to the new string in /etc/apt/sources.list (mind upper-/lowercase)
apt-get upgrade
apt-get dist-upgrade
sed -i 's/stretch/buster/g' /etc/apt/sources.list
sed -i 's/stretch/buster/g' /etc/apt/sources.list
* update the system
apt-get update
apt-get upgrade
apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade && apt-get -y autoremove
apt-get dist-upgrade
* boot your system
apt-get -y autoremove
shutdown -r now
cat /etc/issue

==== 10 -> 11 (buster -> bullseye) ====
cat /etc/issue
apt-get update
apt-get upgrade
apt-get dist-upgrade
sed -i 's/buster/bullseye/g' /etc/apt/sources.list
sed -i 's/bullseye\/updates/bullseye-security/g' /etc/apt/sources.list
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get -y autoremove
shutdown -r now
shutdown -r now
* Check your current major version number
cat /etc/issue
cat /etc/issue



Revision as of 13:57, 3 May 2022

Console

Config/Setup/Install

System

upgrade Debian to the next major version

8 -> 9 (jessie -> stretch)

cat /etc/issue
apt-get update
apt-get upgrade
apt-get dist-upgrade
sed -i 's/jessie/stretch/g' /etc/apt/sources.list
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get -y autoremove
shutdown -r now
cat /etc/issue

9 -> 10 (stretch -> buster)

cat /etc/issue
apt-get update
apt-get upgrade
apt-get dist-upgrade
sed -i 's/stretch/buster/g' /etc/apt/sources.list
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get -y autoremove
shutdown -r now
cat /etc/issue

10 -> 11 (buster -> bullseye)

cat /etc/issue
apt-get update
apt-get upgrade
apt-get dist-upgrade
sed -i 's/buster/bullseye/g' /etc/apt/sources.list
sed -i 's/bullseye\/updates/bullseye-security/g' /etc/apt/sources.list
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get -y autoremove
shutdown -r now
cat /etc/issue

date uses wrong timezone, shows wrong format

timedatectl list-timezones | grep Berlin
timedatectl set-timezone Europe/Berlin

man date
vi ~/.bashrc
alias date="date +'%F %T'"

Other


sudo

apt-get install sudo
adduser <user> sudo
adduser andreas sudo

User andreas has to relogin for the new group to be enabled.

top

The output of top looks uninteresting and is bad to read. This does not have to be that way. Download Media:Top-config.zip to your home directory, unzip it and hope it does not crash/destroy something in your system. I only tested this with Debian 10.

  • download to your home directory
  • unzip
  • call top
top

I just pressed '?' and tried the things they tell you there. Then I zipped the result.

install c++

sudo apt-get install build-essential manpages-dev libstdc++-8-doc

If libstdc++-8-doc does not exist, check for later versions. libstdc++-9-doc ...