Difference between revisions of "Template:OfficialUbuntuCore"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
Line 12: Line 12:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
===Setup Network Configurations===
 
===Setup Network Configurations===
 +
====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:
 
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:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 24: Line 25:
 
     gateway 192.168.1.1
 
     gateway 192.168.1.1
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
====Set DNS====
 
You also need to modify the following file to add the DNS configuration:
 
You also need to modify the following file to add the DNS configuration:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
vi /etc/systemd/resolved.conf
 
vi /etc/systemd/resolved.conf
 
</syntaxhighlight>
 
</syntaxhighlight>
例如设置为192.168.1.1:
+
For example, set to 192.168.1.1:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
[Resolve]
 
[Resolve]
Line 38: Line 40:
 
sudo systemctl enable systemd-resolved.service
 
sudo systemctl enable systemd-resolved.service
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
====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.
 
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.
 
===Install the kernel-header package===
 
===Install the kernel-header package===

Revision as of 07:06, 25 May 2022

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 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 Install the kernel-header package

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