Identifying Automatically Started System Processes
w -f
看誰登進來登多久
Grep
“model name” /proc/cpuinfo 查看你的CPU model
名稱相關資料
VIRT指的是有多少記憶體在虛擬機裡面使用
RES指的是實際的記憶體
S睡覺
R正在執行
Systemctl –t help 查看Systemctl參數
Systemctl status sshd.service查看目前的服務狀態
Active(running)指的是正在執行
Active(exited)指的是結束
Active(waiting)指的是正在等待一個事件
inactive指的是沒有在執行
enable開機有啟動
disable開機沒有啟動取消的意思
Static
他沒有被啟動但可能在重新啟動中
意思就是說不用去啟動enable會自動幫你啟動起來
Using
systemctl
to Manage Services
Systemctl
列出所有系統中的startup
Systemctl
–type=service
列出所有有關service服務
Systemctl
is-enabled sshd 查看sshd有沒有啟動
Systemctl list-units –type=service列出所有的service服務以單位列出來
Systemctl restart sshd.service重新啟動sshd服務
Systemctl stop sshd.service 停止sshd服務
SSH
Key
ssh-keygen產生2把鑰匙
~/.ssh/id_rsa代表私鑰
~/.ssh/id_pub代表公鑰
/etc/ ssh/ sshd_config 表示Server設定檔
SSH
Service Configuration
PermitRootLogin no 表示沒辦法從遠端登入系統
PermitRootLogin without-password 遠端登入不用密碼就可以登入了
systemd – journald and rsyslog.系統日誌及系統紀錄
systemd – journald 他提供強化型的記錄管理服務包含核心及開機步驟流程、標準的輸入訊息
System
Log
/var /log/messages存放一些大多數系統日誌訊息記錄在這裡。唯一的例外是身份驗證和電子郵件處理的訊息,不是存放在這裡
/var/log /secure存放一些安全驗證的紀錄和錯誤相關消息。
/var/log/maillog 存放mail的紀錄相關訊息
/var/log/cron存放週期性的工作的紀錄(cron是一種定時執行的程式)
/var/log /boot 存放開機流程紀錄
沒有留言:
張貼留言