OpenBSD creating additional ptys

Posted on Mar 27, 2012

I like a lot of windows.  A lot of them.  Today I bumped into a default limit on OpenBSD 4.8 and tmux(1) started returning “No such file or directory” when I attempted to create a new window.  This turned out to be a simple thing to solve, though.

By default, OpenBSD only creates 63 pseudo-terminals in /dev.  Luckily, creating additional ptys is as simple as:

# cd /dev
# ls -1 | grep -c pty
63
# sh MAKEDEV pty1
# sh MAKEDEV pty2
# sh MAKEDEV pty3
# ls -1 | grep -c pty
248

You can keep going up to pty15 for a total of 992 ptys.