Benutzer-Werkzeuge

Webseiten-Werkzeuge


commands-freebsd

Sammlung nützlicher Befehle

FreeBSD Specific Commands

Resources and System Analysis

sockstat -l46

sockstat(1)

information about hard drives

geom disk list
camcontrol devlist

geom(8) camcontrol(8)

display I/O statistics of phyisical drives (including delete operations)

gstat -pd

gstat(8)

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)

## via pkg
pkg delete some-pkg-name
pkg autoremove
## or via portmaster
portmaster -e some-pkg-name

man pkg-delete man pkg-autoremove man portmaster

remove a port while keeping what depends on it

pkg delete -f some-pkg-name

man pkg-delete

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

portmaster -af

man portmaster

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

remove all packages matching a glob pattern

pkg delete -g 'php70*'

man pkg-delete

clean out stale ports that used to be depended on

pkg autoremove # or
portmaster -s

man pkg-autoremove man portmaster

show packages with vulnerabilities (with vulnerability DB fetch)

pkg audit -F

man pkg-audit

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)

chpass someusername

man chpass

edit unix users of a jail

vipw -d /usr/jails/JAILNAME/etc/

man vipw

Misc

view last boot messages

less /var/run/dmesg.boot

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

cpuset -c -l 2,5 /bin/csh

man cpuset

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

ifconfig lo1 create
ifconfig lo1 name dummy0

man ifconfig

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. Weitere Information
commands-freebsd.txt · Zuletzt geändert: 2018/12/09 12:32 von alex