Sammlung nützlicher Befehle
FreeBSD Specific Commands
Resources and System Analysis
print all listening TCP/UDP sockets for IPv4 and IPv6
display I/O statistics of phyisical drives (including delete operations)
display number of interrupts taken per device
## counts since startup
vmstat -i
## counts for each second
vmstat -i 1
vmstat(8)
Package Management
find the category of a port
file / usr/ ports/*/ some-port-name
remove a port and its dependencies (including what depends on them)
remove a port while keeping what depends on it
rebuild port and dependencies
## include all what depends on it
portmaster -f -r some-pkg-name
## include all it depends on
portmaster -f some-pkg-name
man portmaster
rebuild all ports
replace an installed port with another version
## example: Perl from 5.24 to 5.26
portmaster -o lang/ perl5.26 perl5-5.24.4
## if there are modules, recompile them (e.g. for Perl)
portmaster -f 'p5-*'
man portmaster
update packages matching a glob pattern, which have a newer version available in ports
## example for RubyGems
portmaster --update-if-newer 'rubygem-*'
man portmaster
remove packages matching a glob pattern
clean out stale ports that used to be depended on
show packages with vulnerabilities (with vulnerability DB fetch)
check installed packages
## check installed files for invalid checksums
pkg check -s
## check for missing dependencies
pkg check -d
## check correct linking of packages and their libraries
pkg check -B
man pkg-check
User Management
edit details of a user (e.g. Shell)
edit unix users of a jail
vipw -d / usr/ jails/ JAILNAME/ etc/
man vipw
Misc
view last boot messages
disable/enable auto-start of a jail managed with ezjail
ezjail-admin config -r norun my-jail
ezjail-admin config -r run my-jail
man ezjail-admin
run a shell (and its children processes) only on CPU2 + CPU5
write GPT boot loader to first disk having its first partition a 512K freebsd-boot
gpart bootcode -b / boot/ pmbr -p / boot/ gptzfsboot -i 1 ada0
man gpart
create a second loopback interface and rename it
Cookies helfen bei der Bereitstellung von Inhalten. Durch die Nutzung dieser Seiten erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Rechner gespeichert werden.
OK Weitere Information