Template:OfficialUbuntuCore

From FriendlyELEC WiKi
Revision as of 11:43, 11 January 2023 by Tzs (Talk | contribs) (updated by API)

Jump to: navigation, search

1 Work with FriendlyCore

1.1 FriendlyCore User Account

  • Non-root User:
   User Name: pi
   Password: pi
  • Root:
   User Name: root
   Password: fa

1.2 Update Software Packages

$ sudo apt-get update

1.3 Setup Network Configurations

1.3.1 Set static IP address

By default "eth0" is assigned an IP address obtained via dhcp. If you want to change the setting you need to change the following file:

vi /etc/network/interfaces.d/eth0

For example if you want to assign a static IP to it you can run the following commands:

auto eth0
iface eth0 inet static
    address 192.168.1.231
    netmask 255.255.255.0
    gateway 192.168.1.1

1.3.2 Set a DNS

You also need to modify the following file to add the DNS configuration:

vi /etc/systemd/resolved.conf

For example, set to 192.168.1.1:

[Resolve]
DNS=192.168.1.1

Restart the systemd-resolved service with the following command:

sudo systemctl restart systemd-resolved.service
sudo systemctl enable systemd-resolved.service

1.3.3 Set up to use another network interface

To change the setting of "eth1" you can add a new file similar to eth0's configuration file under the /etc/network/interfaces.d/ directory.

1.4 Setup Wi-Fi

First, use the following command to check if Network-Manager is installed on your system:

which nmcli

If you have installed it, refer to this link to connect to WiFi: Use NetworkManager to configure network settings, If you do not have Network-Manager installed on your system, please refer to the following method to configure WiFi,
By default the WiFi device is "wlan0". You need to create a configuration file under "/etc/network/interfaces.d/" for WiFi:

vi /etc/network/interfaces.d/wlan0

Here is a sample wlan0 file:

auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid YourWiFiESSID
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk YourWiFiPassword

Please replace "YourWiFiESSID" and "YourWiFiPassword" with your WiFiESSID and password. After save and close the file you can connect to your WiFi source by running the following command:

sudo systemctl daemon-reload
sudo systemctl restart networking

After you power on your board it will automatically connect to your WiFi source.
Please note that if you use one TF card to boot multiple boards the WiFi device name will likely be named to "wlan1", "wlan2" and etc. You can reset it to "wlan0" by deleting the contents of the following file and reboot your board: /etc/udev/rules.d/70-persistent-net.rules

1.5 Install the kernel-header package

sudo dpkg -i /opt/linux-headers-*.deb