[POSIX][Command] Linux 常用情境指令集
Intro POSIX (可移植作業系統介面) – Wikipedia HD capacity – 硬碟容量相關 df – 列出本機硬碟使用情況 $ df # 指定掛載點 (Mounted on) $ df / # 自動換算顯示合適容量單位 (-h=/1024 | -H=/1000) $ df -h $df -H # 顯示檔案系統 (如 ext4) $ df -T $ df […]
網頁開發知識 | Web-Dev Blog
Intro POSIX (可移植作業系統介面) – Wikipedia HD capacity – 硬碟容量相關 df – 列出本機硬碟使用情況 $ df # 指定掛載點 (Mounted on) $ df / # 自動換算顯示合適容量單位 (-h=/1024 | -H=/1000) $ df -h $df -H # 顯示檔案系統 (如 ext4) $ df -T $ df […]
Intro 簡易郵件傳輸通訊協定 SMTP 是什麼? | Cloudflare 簡單郵件傳送協定(Simple Mail Transfer Protocol / SMTP)可用在傳送和接收電子郵件的資訊,但 SMTP 通常用作傳送電子郵件而不是接收。 SMTP 是一個相對簡單的基於文字的協定,可以透過協定指定將訊息傳送至一或多個接收者,通過 telnet 程式可以簡單的測試一個 SMTP伺服器。SMTP 主要 TCP port 以前為 25 現今為 587 (TLS) 。DNS 的 MX record 決定 SMTP 伺服器。 角色 Agent Software for example MUA […]
Intro 可以利用/etc/pam.d/下檔案的 hook 效果去觸發執行外部 Shell script file,而 Shell 中去抓取登入者資訊並寄送 email,以達到 SSH Login 自動發信通知 作法 先撰寫建立好 Shell script file 作為發送信件程式: $ vim /etc/ssh/login-notify.sh #!/bin/sh # Change these two lines: sender="sender-address@example.com" recepient="notify-address@example.org" if [ "$PAM_TYPE" != "close_session" ]; then host="`hostname`" subject="SSH Login: […]
ASCII | UTF-8 | UTF-16 | UTF-32 | Big5 | Intro 字元編碼 (Character encoding) – Wikipedia ASCII (ISO/IEC 646) ASCII (American Standard Code for Information Interchange) – Wikipedia ASCII table – Table of ASCII codes, characters and symbols Item Content […]
Intro 適用於Linux的Windows子系統 – Wikipedia Windows Subsystem for Linux (WSL2) 環境設定 – HackMD Windows Subsystem for Linux 為相容層系統,共用 host 檔案管理及網路,目前已相當成熟,適合取代 Cygwin。 WSL 架構 Reference: Ravindu Senal Fernando – Medium 程式軟體搭配 Ubuntu terminal environment – Microsoft Store 可以自行選擇 WSL 發行版,這裡使用 Ubuntu 為例 […]
Image: Build | Tag | Commit | Pull/Push | Docker File | Compose File Container: Run Cheat Sheet | dockerlabs Command-line interfaces (CLIs) from Docker Docs: Docker CLI Docker compose CLI Daemon (dockerd) CLI CLI Auto-completion: MacOS – How to […]
Intro Docker – Wikipedia Docker 官方網站 Docker Documentation Concept – 概念 Difference between VM vs Docker Docker overview | Docker Documentation Quick Start Guides – Get started | Docker Documentation Docker 指令集 | 指令速查表 – YIDAS Code PHP and Nginx […]
Intro Kubernetes – Wikipedia Kubernetes Documentation (Reference: ByteByteGoHq/system-design-101) 生態系 (Ecosystem) Minikube – 本地端工具 適合開發測試使用的本地端 K8S 集群工具,透過單一 Cluster 方便在本地端上演練各種指令操作 Hello Minikube – Kubernetes minikube start TBC References [AWS EKS] 從零打造一個可運行 Fargate workload 的 EKS cluster [Kubernetes] Pod 的設計 & 相關運作機制
Intro Netcat (nc) Telnet Telnet 簡單用於測試TCP連線 $ telnet www.example.com 80 GET /path/to/file.html HTTP/1.1 Host: www.example.com Connection: close Netcat (nc) TCP/UDP讀寫工具,測試UDP利器 在埠25建立內容未加工過的連接(類似telnet): $ nc mail.server.net 25 利用零模式I/O(參數 -z)檢查192.168.0.1的UDP埠(參數 -u)80-90是否開啟: $ nc -vzu 192.168.0.1 80-81 測試UDP,透過發送訊息 $ nc -vu example.com 443 Connection […]
Intro Wikipedia – tcpdump tcpdump 是一個執行在命令列下的數據包剖析器。它允許使用者攔截和顯示傳送或收到過網路連接到該電腦的 TCP/IP 和其他封包。 MAN PAGE OF TCPDUMP 用法 $ tcpdump -i [interface] '[expression]' $ tcpdump -i en0 'tcp && host www.yidas.com' # No interface flag is equal to any $ tcpdump -i any 'port 22' […]