First run: apt update && apt upgrade -y && apt autoremove -y && reboot Then create a file named server.sh, paste the following content and run it using bash server.sh: #!/bin/bash