Skip to main content

Linux Administration

校時與時區設定

Tutorials How to Sync Linux Time With NTP Server - Make Tech Easier Chrony Built-in on Cen...

系統管理技巧

Home 目錄 完整複製 Home 目錄 由於 User 的 Home 目錄內有許多隱藏檔,若要完整複製它們,有兩個方法: 方法一:可以複製成一個新目錄 cd /home cp -a ...

Q & A

NFS 遠端目錄無法卸載 Umount a NFS directory with the error: device is busy 當遭遇某些異常情況時,原先的 NFS 目錄可能無...

SELinux

安全增強式 Security-Enhanced Linux(SELinux)是一個在內核中實踐的強制存取控制(MAC)安全性機制。SELinux 首先在 CentOS 4 出現,並在其後的 Ce...

patch & diff

單一檔案 # 建立更新檔 diff -uN old.code new.code > patch.file # 套用更新檔 patch < patch.file # 回復更新前 ...

Subnet mask v.s. CIDR

Netmask Netmask (binary) CIDR Notes ____________________...

ps

以 PID 查詢 ps -fp &lt;PID&gt; ps -fp &lt;PID#1&gt;,&lt;PID#2&gt;,&lt;PID#3&gt; 分析 CPU/Memory 使用...

Rsync

限制頻寬 限制傳檔的網路頻寬 --bwlimit=30000 30000 = 30000 KB/ps = 30 MB/ps Dry Run rsync -avh -n <sou...

screen

screen 常用指令 啟用 screen #&gt; screen or #&gt; screen -S &lt;session-name&gt; 列出所有 session #...

Learning 拾人牙慧

系統管理  Core Dump Creating and debugging Linux dump files [gdb] GDB debugging tutorial for b...

fsck

教學連結 Check and Repair Filesystem Errors With fsck Command in Linux

Cheat Sheets

Bash bash_cheat_sheet.pdf bash-shell-scripting.pdf Curl curl-cheat-sheet.pdf Git ...

Systemd

簡介 Linux 的各項服務管理一直都是用 SysV Init Script,Systemd 是新的管理工具,在 CentOS 7 開始已經有支援。 設定上比 SysV Init 簡單許多,...

CentOS/RedHat Tips

停用不必要的服務 CentOS 7/8: secure-linux.sh #!/usr/bin/env bash # Author: A.Lang(alang.hsu[AT]gmail.c...

ssh

測試驗證服務的設定 # 重啟 sshd 前先驗證設定 # 沒有任何內容輸出,表示設定沒有錯誤 # 指令必須使用絕對路徑 /usr/sbin/sshd -t 檢視連線參數的設定 $ s...

FirewallD

Introduction FirewallD is frontend controller for iptables used to implement persistent network ...

Ubuntu and Debian

檔案及目錄加密-Encrypt

nmap

Nmap是一款用於網路發現和安全審計的網路安全工具,它是自由軟體。軟體名字Nmap是Network Mapper的簡稱。通常情況下,Nmap用於: 列舉網路主機清單 管理服務升級排程 監視主機 ...

sar

How to use SAR to Monitor System Performance in Red Hat Enterprise Linux - Red Hat Customer Por...

NIS Server

網路資訊服務簡稱 NIS,時又譯為網路資料服務協定,亦即一般簡稱之「黃頁」YP,最早由昇陽公司開發出來,為一套用來管理電腦網路中所有與電腦系統管理相關之設定檔,如使用者帳號、密碼、主機名稱或群組...

Bash Background Process

# Starting a process in the background and bringing it back to the foreground $ sleep 1000 &amp;...

Grub2

RedHat/CentOS 7 設定檔: /etc/default/grub,通用設定 /etc/grub.d/40_custom,自訂內容 建立開機用的設定檔(請勿手動編輯) ...

CentOS Kernel Upgrade

RedHat KB: CHAPTER 5. MANUALLY UPGRADING THE KERNEL Kernel Packages CentOS/RedHat Linux 與 kerne...

sudo

The Difference Between Su, Sudo Su, Sudo -i, and Sudo -s How To Run All Programs In A Director...

tmux

Sessions Start session tmux new tmux new -s mysession Show sessions tmux ls Kill se...

SAN & iSCSI

SAN - Storage Area Network, iSCSI - Internet Small Computer System Interface

iptables

基本指令 列出現有規則 iptables -L -n -v iptables -L -n -v --line-numbers iptables -L INPUT -n -v --line...

RClone

Rclone syncs your files to cloud storage Installation Ubuntu sudo apt install rclone Storj DC...

vmstat

Case #1:CPU &amp; RAM 負載低   [root@deki ~]# vmstat 2 procs -----------memory---------- ---swap-...

IBM OpenPower Linux

LVM

LVM 磁碟管理

Red Hat Subscription Manager

Red Hat 訂閱更新服務

One-liner Commands

1. 建立多個目錄 mkdir -p -v /home/josevnz/tmp/{dir1,anotherdir,similardir} 2. 搜尋取代關鍵字 # With sedsed ...

Linux Rescue

RedHat/CentOS How to recover a root password in Red Hat-based Linux systems Single-User Mod...

USB 管理

限制非 root 用戶可存取 USB 硬碟 修改 /etc/modprobe.conf # added by alang, this line would disable the USB d...

帳號進階管理

網路管理

Linux Backup Tools

Data Backup Restic - is a fast, open source, secure and cross-platform backup program. It allo...

ufw - Uncomplicated Firewall

Uncomplicated Firewall,簡稱 UFW,是 Ubuntu 系統上預設的防火牆組件。UFW 是為輕量化組態 iptables 而開發的一款工具。UFW 提供一個非常友好的介面用...

Makefile

何謂 Makefile make 命令雖有很多內建的功能,但它也無法知道如何建立應用程式。故必須提供一個檔案,即 Makefile,告訴 make 如何建立應用程式。 Makefile ...

Rsyslog

Tutorials Remote Syslogging with rsyslog on Red Hat Enterprise Linux - Red Hat Customer Portal...

DNS