doas
Execute commands as another user.
httpd
ksh
package manager aliases
alias xi='doas pkg_add'
alias xu='doas pkg_add -u'
alias xs='pkg_info -Q'
alias xr='doas pkg_add -aa'
alias xc='doas pkg_delete -a'
alias xrm='doas pkg_delete'
alias xinfo='pkg_info'
alias xlist='pkg_info -m'
key repeat bug
If you're having a bug where the keyboard is glitchy in xorg Specifically keys are sometimes repeating it might be an issue with your clock source. There seems to be a problem with tsc on some amd systems.
sysctl kern.timecounter.hardware=acpihpet0
trackpad firefox gestures
https://github.com/jcs/tpadnav
A little utility for OpenBSD that listens for left and right two-finger touchpad
swipe gestures and generates keyboard events so Firefox will navigate back and
forward accordingly
lsblk
List how many disks you have:
sysctl hw.diskcount
List disk names:
sysctl hw.disknames
sysctl -a | grep -i disk
List mounted partitions:
mount
df -h
package manager
Install - doas pkg_add
Mark unneeded - doas pkg_add -aa
Update - doas pkg_add -u
Search - pkg_info -Q
Clean (remove unneeded) - doas pkg_delete -a
Important messages scrolled by while installing?
pkg_info -aM | less
Installing some massive bloated program and it's crashing a lot? OpenBSD uses
pretty strict default open file limits for users. This can be checked with
ulimit -a
.
xenodm
You can remove xconsole from this file:
/etc/X11/xenodm/Xsetup_0
source and ports
Openbsd has three "flavours" - release - stable (release with security patches) - current
Make sure to keep ports and base in sync!
List of cvs servers:
https://www.openbsd.org/anoncvs.html#CVSROOT
/usr/src
/usr/src is owned by the wsrc
group so you need to add your user to that group
before running the following commands. This can be done with:
user mod -G wsrc kota
.
If you are following the 6.5 -stable branch using the USA mirror:
cd /usr
cvs -qd anoncvs@anoncvs4.usa.openbsd.org:/cvs checkout -rOPENBSD_6_5 -P src
Updating 6.5 later on:
cd /usr/src
cvs -q up -Pd -rOPENBSD_6_5
It does not destroy any of your local changes; rather it attempts to merge changes in.
ports
Make sure your user is member of the wsrc
group and that /usr/ports
is group
writable by wsrc.
cd /usr
cvs -qd anoncvs@anoncvs4.usa.openbsd.org:/cvs checkout -rOPENBSD_6_5 -P ports
Updating ports:
cd /usr/ports
cvs -q up -Pd -rOPENBSD_6_5
auto package update
$ su -
# git clone https://tildegit.org/solene/pkgupdate.git
# cp pkgupdate/pkgupdate /usr/local/bin/
# crontab -e (which will open EDITOR, add the following lines)
### BEGIN this goes into crontab
# for updating on boot
@reboot /usr/local/bin/pkgupdate
### END of this goes into crontab