Last active
September 7, 2021 06:27
-
-
Save alexishida/476ba76959b60212953322ecda1cc2f6 to your computer and use it in GitHub Desktop.
Ubuntu 20.04 Server Raspiberry Pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SSH PASSWORD | |
| sudo pico /etc/ssh/sshd_config | |
| PasswordAuthentication yes | |
| PermitRootLogin yes | |
| sudo service sshd restart | |
| # Ubuntu configure locale e timezone | |
| sudo dpkg-reconfigure locales | |
| sudo dpkg-reconfigure tzdata | |
| # CONFIG WIFI | |
| # List network interfaces | |
| $ ls /sys/class/net | |
| # enp0s25 lo wlp3s0 | |
| $ cd /etc/netplan/ | |
| $ sudo pico /etc/netplan/50-cloud-init.yaml | |
| # This file is generated from information provided by the datasource. Changes | |
| # to it will not persist across an instance reboot. To disable cloud-init's | |
| # network configuration capabilities, write a file | |
| # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: | |
| # network: {config: disabled} | |
| network: | |
| ethernets: | |
| eth0: | |
| dhcp4: true | |
| optional: true | |
| version: 2 | |
| wifis: | |
| wlp3s0: | |
| optional: true | |
| access-points: | |
| "SSID-NAME-HERE": | |
| password: "PASSWORD-HERE" | |
| dhcp4: true | |
| link-local: [ ipv4 ] | |
| $ sudo netplan --debug apply | |
| $ ip a | |
| # How to disable cloud-init in Ubuntu | |
| # Prevent start | |
| # Create an empty file to prevent the service from starting | |
| $ sudo touch /etc/cloud/cloud-init.disabled | |
| # Uninstall | |
| # Disable all services (uncheck everything except "None"): | |
| $ sudo dpkg-reconfigure cloud-init | |
| # Uninstall the package and delete the folders | |
| $ sudo dpkg-reconfigure cloud-init | |
| $ sudo apt-get purge cloud-init | |
| $ sudo rm -rf /etc/cloud/ && sudo rm -rf /var/lib/cloud/ | |
| $ sudo reboot | |
| # Disable IPV6 in /etc/sysctl.conf: | |
| net.ipv6.conf.all.disable_ipv6 = 1 | |
| net.ipv6.conf.default.disable_ipv6 = 1 | |
| net.ipv6.conf.wlan0.disable_ipv6 = 1 | |
| net.ipv6.conf.lo.disable_ipv6 = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment