OpenBSD 基础
最后更新于
permit persist :wheel$ id
$ whoami
$ groups
$ getent passwd alice# usermod -G wheel,staff alice# usermod -g staff alice# chpass alice# userdel -r alice$ ls -l /etc/passwd-rw-r--r-- 1 root wheel 1234 Jul 10 12:00 /etc/passwd# chmod 755 script.sh# chmod u+x script.sh
# chmod g-w file.txt
# chmod o= file.txt# chmod 4755 /usr/local/bin/somescript$ ls -l /usr/local/bin/somescript# chmod 2755 /usr/local/bin/teamcmd# chmod 2775 /var/shared# chmod 1777 /tmp$ ls -ld /tmpdrwxrwxrwt 10 root wheel 5120 Jul 11 15:10 /tmpexport ENV="$HOME/.kshrc"
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
umask 022$ ps aux
$ top$ kill -TERM 1234 # 优雅停止进程
$ kill -KILL 1234 # 强制终止
$ pkill httpd # 按名称终止# rcctl enable ntpd
# rcctl start ntpd# rcctl stop ntpd
# rcctl disable ntpd# rcctl restart httpd
# rcctl set httpd flags "-d"# rcctl check ntpd$ uname -aOpenBSD myhost.example.org 7.8 GENERIC.MP#123 amd64