FreeBSD command reference Filed Under: Linux & BSD
Introduction
So you will probably think why on earth I’m writing this command reference guide and is normally quite easy stuff. Well the reason is that I don’t spend too much time around servers (most of the time I’m doing networking stuff) so I kind of forget the exact command for how to do things on FreeBSD.
Feel free to post in the comments any other command you may know. I will be updating this post every time I find a command that is useful.
Command Reference
Change the shell for a user
chsh -s "new shell path" user
network card configuration
Edit the file /etc/rc.conf with the following settings:
example interface is named dc0
Static IP address:
ifconfig_dc0="inet 10.2.2.2 netmask 255.255.255.0"
defaultrouter="10.2.2.2"
DHCP configuration:
ifconfig_dc0="DHCP"
To manually setup the default gateway through the command line
route add default IP_Address
Enable GDM on startup
Add to /etc/rc.conf
gdm_enable="YES"
Register a name with DNS when using DHCP
Add to you dhclient.conf file:
send host-name "name";
send fqdn.fqdn "fqdn name";
send fqdn.server-update off;
Apache 2.2
To enable apache 2.2 add to /etc/rc.conf
apache22_enable="YES"
apache_flags=""
If you have the following message “Failed to enable the ‘httpready’ Accept Filter” you will need to load the following module on /boot/loader.conf
accf_http_load="YES"
NTP
To enable NTP on startup add to /etc/rc.conf
ntpdate_enable="YES"
ntpdate_hosts="IP Address"
SNMP
To enable SNMP access on the server, add the following lines to /etc/rc.conf
bsnmpd_enable="YES" bsnmpd_flags=""
Then edit the file /etc/snmpd.config to modify your Read only and Read/Write strings from the default ones.
Tags: command reference, configuration, freebsd
- Permalink
- Alberto Diaz
- 23 Aug 2008 12:32 PM
- Comments (0)