How to reduce TTY quantity?

I installed FreeBSD for an Internet proxy only. Because of limited server memory, I would like to offer as much as possible system memory for the Squid proxy server.

How can I reduce the system's default eight TTYs to only two? How to disable some system daemon such as moused?

Thanks very much for your help.
 
Edit /etc/ttys to reduce the number of ttys. That will probably not save a lot of RAM.

moused(8) does not work as expected if you have a USB mouse. It will be started when the USB mouse is detected by devd(8). To prevent that, add
Code:
moused_nondefault_enable="NO"
to /etc/rc.conf.
 
jamesgu_cn said:
How can I reduce the system's default eight TTYs to only two?

Code:
#!/bin/sh
	sed -i '' -e's|ttyv0.*|ttyv0	"/usr/libexec/getty Pc"		xterm	on  secure|' /etc/ttys
	sed -i '' -e's|ttyv1.*|ttyv1	"/usr/libexec/getty Pc"		xterm	on  secure|' /etc/ttys
	sed -i '' -e's|ttyv2.*|ttyv2	"/usr/libexec/getty Pc"		xterm	off  secure|' /etc/ttys
	sed -i '' -e's|ttyv3.*|ttyv3	"/usr/libexec/getty Pc"		xterm	off  secure|' /etc/ttys
	sed -i '' -e's|ttyv4.*|ttyv4	"/usr/libexec/getty Pc"		xterm	off  secure|' /etc/ttys
	sed -i '' -e's|ttyv5.*|ttyv5	"/usr/libexec/getty Pc"		xterm	off  secure|' /etc/ttys
	sed -i '' -e's|ttyv6.*|ttyv6	"/usr/libexec/getty Pc"		xterm	off  secure|' /etc/ttys
	sed -i '' -e's|ttyv7.*|ttyv7	"/usr/libexec/getty Pc"		xterm	off  secure|' /etc/ttys
This is a simple shell script which I use to do so. As you can see, in /etc/ttys file you can turn off any TTYs you don't need.
 
Back
Top