Last active
February 3, 2020 19:16
-
-
Save thomersch/5840753 to your computer and use it in GitHub Desktop.
Useful FreeBSD commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Installing software | |
* Set up ports collection | |
portsnap fetch && portsnap extract | |
* Updating ports collection | |
portsnap fetch && portsnap update | |
* Remove port | |
pkg_delete {} | |
* Upgrading with portupgrade | |
# set up | |
cd /usr/ports/ports-mgmt/portupgrade | |
make install clean | |
# perform upgrade of all packages | |
portupgrade -a | |
* List all hard drives | |
camcontrol devlist | |
* Spin down drives if idle | |
camcontrol standby <drive> -t <seconds> | |
* Get partition information | |
fdisk <device> | |
* Mount all partitions from /etc/fstab | |
mount -a | |
* Import ZFS pool (from old installation or other machine) | |
zpool import | |
zpool import -f <poolname> | |
* Activate NFS exports | |
echo 'nfs_server_enable="YES"' >> /etc/rc.conf | |
* Share ZFS pool via NFS | |
zfs share <poolname> | |
* Reload NFS exports | |
/etc/rc.d/mountd reload | |
* ZFS pool status | |
zpool status | |
* Show NFS exports | |
showmount -e | |
* Show system time/date | |
date | |
* Restart networking | |
/etc/rc.d/netif restart && /etc/rc.d/routing restart | |
* Check RAM for ECC | |
dmidecode -t memory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment