With regard to "sudo -i"....If this command is issued once, is this enough to ex . . .

Ryebridge:
With regard to “sudo -i”…If this command is issued once, is this enough to execute subsequent commands which require elevated permission or should we be using “sudo <command>” every time we need to run a command ? Thinking about troubleshooting and installation/upgrades as the exam env doesn’t automatically have root access.

Vitor Jr.:
sudo -i means interactive. Each command after this will be executed as root until you type exit or press Ctrl + d

Ryebridge:
Thanks @Vitor Jr. Was thinking about the numerous apt commands for the upgrade !

Vitor Jr.:
I really prefer to use sudo for each command. It’s easy to forget to rollback to normal user a run a bunch of commands with root supposed to be executed with a less privileged user :slight_smile:

Ryebridge:
Very good point @Vitor Jr. I will use without sudo -i.

sudo apt-mark unhold kubeadm &amp;&amp; \
sudo apt-get update &amp;&amp; sudo apt-get install -y kubeadm=1.20.0-00 &amp;&amp; \
sudo apt-mark hold kubeadm
sudo kubeadm upgrade apply v1.20.0
sudo apt-mark unhold kubelet kubectl &amp;&amp; \
sudo apt-get update &amp;&amp; sudo apt-get install -y kubelet=1.20.0-00 kubectl=1.20.0-00  &amp;&amp; \
sudo apt-mark hold kubelet kubectl
sudo systemctl daemon-reload
sudo systemctl restart kubelet