1. What is FreeBSD?
FreeBSD is a Unix-like operating system, FreeBSD is the world's first open source system, it is derived from the source code based on BSD Unix. BSD Unix is an operating system developed by the University of California, Berkeley from 1975 to 1993. FreeBSD is an enterprise-level system that supports many hardware and architectures. Like other operating systems in the BSD family, FreeBSD's core, drivers, and all Userland applications (such as the Unix shell and commands such as cat and ps) are stored in the source code library.
2. Why is FreeBSD?
The BSD protocol gives FreeBSD unlimited tolerance. Its network stack is excellent.
3. Download the system image
Register an account at the Huawei Cloud Open Source Mirror Site and log in
https://mirrors.huaweicloud.com/
We visit the URL directly in the browser
https://repo.huaweicloud.com/freebsd/releases/VM-IMAGES/12.1-RELEASE/amd64/Latest/
Then select qcow2 mirror
4. Import the virtual machine file into the system
Unzip the FreeBSD-12.1-RELEASE-amd64.qcow2.xz file and place it on the computer desktop. Upload to the Raspberry Pi via winSCP (either FTP software).
File protocol SCP, the user name is pi by default, the password is raspberry by default, and the host name is IP address. Generally speaking, the router is visible.
After accepting the host key, drag the file directly into it. The initialization directory should be /home/pi. The specific time depends on the network connection method and the SD card reading rate.
5. Configure the virtual machine
Open the VNC connection (if your Raspberry Pi is equipped with a display, you don't need to open the vnc, just operate it directly on the display)
Click on the apple in the upper left corner, find the system, and click "Virtual System Manager".
Enter the password of the pi user raspberry and click "Authorize".
Click the icon to create a new virtual machine.
Choose how to install the operating system: "Import Existing Disk Options"
Architecture: "X86_64"
Click "Browse" and
click "Local Browse" to find the FreeBSD-11.2-RELEASE-amd64.qcow2 file that you just imported.
General configuration
Resource configuration Generally speaking, 1G memory and 1 core is enough. You
need to wait a little longer.
If you are stuck in the sendmail service for a long time,
it is recommended to directly ctrl C to terminate this service. This service can be completely shut down after booting.
After the installation is complete, enter root to log in.
Just press Enter without password. This completes the system installation.
First we have to set a root password
passwd
Then enter the password twice, it is recommended to use raspberry to facilitate login.
6. Configure ssh login
ee /etc/ssh/sshd_config
(Note: ee is an editor under FreeBSD, press ESC to save and exit according to the options)
In the file, delete the # in the picture line below, and change "no" to "yes";
press ESC to save.
Similarly, write a new line in the /etc/rc.conf file
ee /etc/rc.conf
Write sshd_enable="YES" to
generate an SSH key:
ssh-keygen A
and restart the sshd service:
service sshd restart
View system ip address:
ifconfig
After checking the IP, you can remotely link to the FreeBSD system in the qemu virtual machine through ssh.
Enter the following command in the local system terminal:
ssh [email protected](你的ip)
Enter yes, then press Enter, then enter the previously set password raspberry, you can successfully log in
Easter eggs
Terminal input:
grdc
Get a retro clock: