uname -v
##列出開啟中的socket
sockstat
##列出月曆
cal
##清除螢幕
clear
##顯示並動態更新所有系統資訊
systat -vm
##將某指令下達後,按^Z暫停程式,然後再按bg即可丟到背景執行
bg
##背景執行的所有程序
jobs
##列出最近一星期使用者登入狀況
last
##set date
date yymmddhhmm.ss
##顯示系統開機主機狀況
uptime
##顯示該使用者的uid gid 和群組,如沒家使用者則列出自己
id user
##用來搜尋檔名符合string的原始碼檔二進位檔或說明檔
whereis string
##在資料夾及其子資料夾下搜尋
find 資料夾 –name 檔名
find / -name group
##在檔案內搜尋字串
grep 搜尋字串 檔名
grep ifconfig rc.conf
##檢查並修復磁區
fsck 磁區名
##掛載磁區
mount 磁區名
##卸載磁區
umount 磁區名
##顯示網路連線狀況
netstat
##查詢所有網路介面的情形
ifconfig -a
>##
## 修改putty ssh port 為443(原https用)
ee /etc/ssh/sshd_config 注意 不是 "/etc/ssh/ssh_config"
找#port 22
改成port 443
改好後Run
kill -s HUP `cat /var/run/sshd.pid`
即可啟動 Port 443
## 使用Putty在VirtualBox連FreeBSD
關閉 FreeBSD shutdown -p now
在/Oracle/VirtualBox/執行
VBoxManage modifyvm "FreeBSD82" --natpf1 "guestssh,tcp,,2222,,22"
Putty 127.0.0.1 2222 即可連上
http://blog.yam.com/flyzc/article/15137400
## 讓user可以變Super User
法一 # pw user mod UserName -G wheel
# groups vivek
法二
ee /etc/group
在第一行最後加上
root,username
##Sysinstall## 讓user可以變Super User
法一 # pw user mod UserName -G wheel
# groups vivek
/usr/sbin/sysinstall
##關機
shutdown -p now
##使用FTP
ee /etc/rc.conf
ftpd_enable="YES"
reboot
ee /etc/ftpwelcome
Welcome to 61.220.127.234 FTP !!
##重新啟動inetd
kill -1 `cat /var/run/inetd.pid`
##恢復 FreeBSD 的 root 密碼 來自這裡http://www.hkcode.com/linux-bsd-notes/399
當在 FreeBSD 忘記了 root 密碼時,可以在開機時進入 single user mode 及重新設定密碼,方法如下:
1. 重新開啟 FreeBSD 主機。
2. 在 "Welcome to FreeBSD!" 開啟選單中按 "4" 選擇 "Boot FreeBSD in single user mode"。
3. 然後會看到 "When prompted Enter full pathname of shell or RETURN for /bin/sh:",直接按 Enter。
4. 這時便會直接進入 single user mode,輸入以下指令重新掛載根目錄 "/" 為可讀寫:
# mount -u /
# mount -a
5. 用 passwd 重新設定 root 密碼:
# passwd
6. 最後重新啟動即可:
# sync;sync;sync;reboot