Difference between revisions of "FreeBSD Commands"
Line 1: | Line 1: | ||
− | |||
− | |||
#Make Paths: | #Make Paths: | ||
#*<pre>PATH=$PATH:/dir</pre> | #*<pre>PATH=$PATH:/dir</pre> |
Latest revision as of 18:22, 11 August 2014
- Make Paths:
PATH=$PATH:/dir
- Create local Database:
/etc/cron.daily/slocate.cron
- Updated Local Database:
/usr/libexec/locate.updatedb
- Change file mode (- for take away/+ to add):
chmod -rwx
- Uncompress foo.z files:
uncompress filename.z
- Ping Floods:
ping -f hostname/IP
- Mount a CDROM:
mount /mnt/cdrom
- Unmount a CDROM:
umount /mnt/cdrom
- Restart inetd:
inetd -W
- Install Programs from Ports:
cd /usr/ports/category/app && make install clean
- Find Files:
find / -name foo
- Remove a User:
rmuser -y username
- System Config Utility:
/stand/sysinstall
- See who is on FTP:
netstat|grep ftp
- Install Software Manually:
make all install restart
- Stop/Start Apache:
apachectl stop/start
- Add a User to Samba:
smbpasswd -a username
- Search For Text in Directory:
grep -r foo ./*
- Search Files Extention in a Directory:
grep -r foo ./*.foo
- List Install Packages:
ls /var/db/pkg
- Show Install Packages:
pkg_info
- Delete Installed Package:
pkg_delete foo
- Add Package:
add_delete foo
- Change File Ownership to all Files in a Directory:
chown -R user.user foo
- Change the Date:
date 200603251927
- Start Apache SSL:
apachectl startssl
- Edit Port Number:
pico /etc/services
- Restart init Services:
killall -HUP inetd
- Update Ports:
cvsup ports-supfile
- Make Encrypted Password:
mkpasswd username
- Edit Password File:
vipw
- Diskspace:
df -h
- Kill Named:
pkill -1 named
- Start Named:
/usr/sbin/named -u bind -t /var/named
- Set User Quota:
edquota (-u)(-g) username
- File Check and Defrag:
fsck
- Show System Messages:
dmesg
- Update FreeBSD:
/usr/local/sbin/freebsd-update fetch
- Install Update FreeBSD:
/usr/local/sbin/freebsd-update install
- Unzip .gz Files:
gzip -d foo.gz
- Create System Links:
ln -s source target
- Show Network Bandwidth:
netstat -m
- Release DHCP Client:
dhclient -r eth0
- Renew DHCP Client:
dhclient eth0
- Rebuild Command Database:
rehash
- Crontab Editor:
crontab -e
- Create a htpasswd file:
htpasswd -bc .htpasswd username password
- Show IP/PID/Ports of all Listening Network Devices:
socketstat -4
- Launch CPAN Updates:
perl -MCPAN -e Shell
- Install DBI or Software:
intall "foo"
- Untar Files:
tar zxvf foo.tar.gz
- Change User's Password:
chpass username
- Change User's Password:
passwd username
- Change Shell:
chsh
- Edit Sudo Users:
visudo
- Install MySQL Database:
mysql_install_db
- Start MySQL in Safe-Mode:
mysql_safe
- Checks current Qmail Queue List:
vi /var/log/qmail/qmail-send/current
- Clean out Qmail queue list (Qmail must be stopped before running command):
qmail-remove -s 211 -p 'pattern-to-match' -i -d (to delete)