
最新更新于2022.11.6
最近在学OS相关的内容,正好研究一下FreeBSD的源码,如果可以的话打算试着对FreeBSD代码树提出PR(Problem Report)。
FreeBSD pkg 配置国内源
禁用原来的FreeBSD.conf # ee /etc/pkg/FreeBSD.conf 将 enabled: yes 改为 enabled: no 保存(ESC, 然后 a -> a)即可 创建另外一个 FreeBSD.conf # mkdir -p /usr/local/etc/pkg/repos # touch /usr/local/etc/pkg/repos/FreeBSD.conf 这个是中科大的源 ustc:{ url: "pkg+http://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/latest", mirror_type: "srv", signature_type: "none", fingerprints: "/usr/share/keys/pkg", enabled: yes }
#!/bin/sh
pw groupmod wheel -m [user]
visudo #修改sudoers权限
chsh -s /usr/local/bin/zsh wheatfox
Code language: PHP (php)
https://docs.freebsd.org/en/books/handbook/virtualization/#virtualization-guest-virtualbox
#!/bin/sh
cd /usr/ports/emulators/virtualbox-ose-additions && make install clean
# add these lines to /etc/rc.conf,
vboxguest_enable="YES"
vboxservice_enable="YES"
# if ntpd(8) or ntpdate(8) is used, disable host time synchronization:
vboxservice_flags="--disable-timesync"
Code language: PHP (php)
coredump
使用abort()函数,或gcore程序
https://www.freebsd.org/cgi/man.cgi?query=abort
https://www.freebsd.org/cgi/man.cgi?query=gcore
clang在make中生成depend文件:
depend:
cc -E -MM *.c > .depend
Code language: CSS (css)