Các câu lệnh Terminal thông dụng nên biết: “Cheat sheet” cho người mới

Terminal (Command Line) là công cụ giúp bạn thao tác với hệ điều hành bằng lệnh. Nếu bạn học lập trình, làm DevOps, backend, frontend, data… thì việc “quen tay” với terminal sẽ giúp làm việc nhanh hơn rất nhiều: tạo dự án, chạy server, quản lý file, debug, xem log, xử lý Git, cài package…

{"type":"doc","content":[{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"I. Khái niệm nhanh: Terminal, Shell và đường dẫn"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. Terminal vs Shell là gì?"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"Terminal"},{"type":"text","text":": ứng dụng để nhập lệnh (macOS Terminal, iTerm2, Windows Terminal…)"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"Shell"},{"type":"text","text":": chương trình hiểu và thực thi lệnh (bash, zsh, fish, PowerShell…)"}]}]}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. Đường dẫn tuyệt đối và tương đối"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"Tuyệt đối"},{"type":"text","text":": bắt đầu từ gốc "},{"type":"text","marks":[{"type":"code"}],"text":"/"},{"type":"text","text":" (Linux/macOS) hoặc "},{"type":"text","marks":[{"type":"code"}],"text":"C:\\"},{"type":"text","text":" (Windows)"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"Tương đối"},{"type":"text","text":": tính từ thư mục hiện tại (ví dụ "},{"type":"text","marks":[{"type":"code"}],"text":"./src"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"../"},{"type":"text","text":")"}]}]}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"3. Một số ký hiệu hay gặp"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","marks":[{"type":"code"}],"text":"."},{"type":"text","text":": thư mục hiện tại"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","marks":[{"type":"code"}],"text":".."},{"type":"text","text":": thư mục cha"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","marks":[{"type":"code"}],"text":"~"},{"type":"text","text":": thư mục home (Linux/macOS)"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","marks":[{"type":"code"}],"text":"/"},{"type":"text","text":": phân tách thư mục (Linux/macOS)"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","marks":[{"type":"code"}],"text":"\\"},{"type":"text","text":": phân tách thư mục (Windows)"}]}]}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"II. Điều hướng thư mục (Navigation)"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. Xem bạn đang ở đâu: "},{"type":"text","marks":[{"type":"code"}],"text":"pwd"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"pwd\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. Liệt kê file/thư mục: "},{"type":"text","marks":[{"type":"code"}],"text":"ls"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"ls\nls -l # dạng chi tiết\nls -a # hiện cả file ẩn (bắt đầu bằng .)\nls -lah # chi tiết + file ẩn + size dễ đọc\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"3. Di chuyển thư mục: "},{"type":"text","marks":[{"type":"code"}],"text":"cd"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"cd /var/log\ncd .. # lên 1 cấp\ncd ~ # về home\ncd - # quay lại thư mục trước đó\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"III. Tạo, xóa, sao chép, di chuyển file/thư mục"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. Tạo thư mục: "},{"type":"text","marks":[{"type":"code"}],"text":"mkdir"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"mkdir projects\nmkdir -p projects/app/src # tạo cả cây thư mục nếu chưa tồn tại\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. Tạo file nhanh: "},{"type":"text","marks":[{"type":"code"}],"text":"touch"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"touch README.md\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"3. Sao chép: "},{"type":"text","marks":[{"type":"code"}],"text":"cp"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"cp a.txt b.txt\ncp -r src backup-src # copy thư mục\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"4. Di chuyển/đổi tên: "},{"type":"text","marks":[{"type":"code"}],"text":"mv"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"mv old.txt new.txt\nmv src/ app/src/ # chuyển thư mục\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"5. Xóa: "},{"type":"text","marks":[{"type":"code"}],"text":"rm"},{"type":"text","text":" (cẩn thận!)"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"rm file.txt\nrm -r folder # xóa thư mục\nrm -rf folder # xóa “mạnh tay”, không hỏi lại (rất nguy hiểm)\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":4},"content":[{"type":"text","text":"1.1 Mẹo an toàn trước khi "},{"type":"text","marks":[{"type":"code"}],"text":"rm -rf"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"Luôn "},{"type":"text","marks":[{"type":"code"}],"text":"ls"},{"type":"text","text":" xem đúng thư mục chưa"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"Ưu tiên xóa “đúng mục tiêu” thay vì xóa cả cây lớn"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"Đừng chạy lệnh xóa khi đang ở "},{"type":"text","marks":[{"type":"code"}],"text":"/"},{"type":"text","text":" hoặc thư mục quan trọng"}]}]}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"IV. Xem nội dung file và xử lý văn bản nhanh"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. In nội dung file: "},{"type":"text","marks":[{"type":"code"}],"text":"cat"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"cat package.json\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. Xem theo trang: "},{"type":"text","marks":[{"type":"code"}],"text":"less"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"less large.log\n# dùng phím: / để tìm, n để next, q để thoát\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"3. Xem vài dòng đầu/cuối: "},{"type":"text","marks":[{"type":"code"}],"text":"head"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"tail"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"head -n 20 app.log\ntail -n 50 app.log\ntail -f app.log # theo dõi log realtime\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"4. Đếm dòng/từ/ký tự: "},{"type":"text","marks":[{"type":"code"}],"text":"wc"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"wc -l app.log # số dòng\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"V. Tìm kiếm trong terminal (cực hữu ích)"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. Tìm file theo tên: "},{"type":"text","marks":[{"type":"code"}],"text":"find"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"find . -name \"*.ts\"\nfind . -type f -name \"README.md\"\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. Tìm chuỗi trong file: "},{"type":"text","marks":[{"type":"code"}],"text":"grep"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"grep \"ERROR\" app.log\ngrep -n \"TODO\" -r src # -n: số dòng, -r: tìm đệ quy trong thư mục\ngrep -i \"password\" .env # -i: không phân biệt hoa thường\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"3. Kết hợp lệnh bằng pipe: "},{"type":"text","marks":[{"type":"code"}],"text":"|"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"cat app.log | grep \"ERROR\" | head -n 20\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"VI. Quyền truy cập và sở hữu (Linux/macOS)"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. Xem quyền file: "},{"type":"text","marks":[{"type":"code"}],"text":"ls -l"}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"Bạn sẽ thấy dạng như "},{"type":"text","marks":[{"type":"code"}],"text":"-rw-r--r--"},{"type":"text","text":" (quyền user/group/other)."}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. Đổi quyền: "},{"type":"text","marks":[{"type":"code"}],"text":"chmod"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"chmod +x script.sh # cho phép chạy\nchmod 644 file.txt # quyền phổ biến cho file\nchmod 755 folder # quyền phổ biến cho folder\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"3. Đổi chủ sở hữu: "},{"type":"text","marks":[{"type":"code"}],"text":"chown"},{"type":"text","text":" (thường cần sudo)"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"sudo chown -R user:group myfolder\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"VII. Quyền admin: "},{"type":"text","marks":[{"type":"code"}],"text":"sudo"},{"type":"text","text":" và “vì sao hay lỗi permission”"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. Chạy lệnh với quyền cao hơn: "},{"type":"text","marks":[{"type":"code"}],"text":"sudo"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"sudo apt update\nsudo rm /path/need/root\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. 1.1 Nguyên tắc"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"Dùng "},{"type":"text","marks":[{"type":"code"}],"text":"sudo"},{"type":"text","text":" khi thật sự cần"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"Tránh chạy tool dev thường ngày bằng "},{"type":"text","marks":[{"type":"code"}],"text":"sudo"},{"type":"text","text":" (có thể làm rối quyền file trong project)"}]}]}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"VIII. Quản lý tiến trình (process)"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. Xem tiến trình: "},{"type":"text","marks":[{"type":"code"}],"text":"ps"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"top"},{"type":"text","text":"/"},{"type":"text","marks":[{"type":"code"}],"text":"htop"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"ps aux | head\ntop\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. Tìm tiến trình theo tên: "},{"type":"text","marks":[{"type":"code"}],"text":"pgrep"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"pgrep node\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"3. Dừng tiến trình: "},{"type":"text","marks":[{"type":"code"}],"text":"kill"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"kill 12345\nkill -9 12345 # “cứng”, chỉ dùng khi cách thường không được\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"4. Xem cổng đang dùng: "},{"type":"text","marks":[{"type":"code"}],"text":"lsof"},{"type":"text","text":" (macOS/Linux)"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"lsof -i :3000\nkill -9 <PID>\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"IX. Mạng và debug kết nối"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. Kiểm tra HTTP nhanh: "},{"type":"text","marks":[{"type":"code"}],"text":"curl"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"curl https://example.com\ncurl -I https://example.com # chỉ header\ncurl -X POST -H \"Content-Type: application/json\" -d '{\"a\":1}' https://api.example.com\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. Ping và DNS"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"ping -c 4 google.com # Linux/macOS (Windows: ping google.com)\nnslookup google.com\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"3. Download file: "},{"type":"text","marks":[{"type":"code"}],"text":"wget"},{"type":"text","text":" (nếu có)"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"wget https://example.com/file.zip\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"X. Nén/giải nén và đóng gói"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. tar.gz (Linux/macOS)"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"tar -czf archive.tar.gz folder/ # nén\ntar -xzf archive.tar.gz # giải nén\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. zip"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"zip -r archive.zip folder/\nunzip archive.zip\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"XI. Thông tin hệ thống và dung lượng"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. Dung lượng ổ đĩa: "},{"type":"text","marks":[{"type":"code"}],"text":"df"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"df -h\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. Dung lượng thư mục: "},{"type":"text","marks":[{"type":"code"}],"text":"du"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"du -sh .\ndu -sh node_modules\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"3. Thông tin OS"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"uname -a\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"XII. Lệnh “chất” giúp làm việc nhanh hơn"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. Lịch sử lệnh: "},{"type":"text","marks":[{"type":"code"}],"text":"history"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"history | tail -n 20\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. Tự động hoàn thành và tìm lại lệnh"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"Nhấn "},{"type":"text","marks":[{"type":"code"}],"text":"Tab"},{"type":"text","text":" để auto-complete"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"Nhấn "},{"type":"text","marks":[{"type":"code"}],"text":"Ctrl + R"},{"type":"text","text":" để search trong history"}]}]}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"3. Redirect và append output"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"node app.js > out.log # ghi đè\nnode app.js >> out.log # nối thêm\nnode app.js 2> err.log # lỗi stderr\nnode app.js > all.log 2>&1 # gộp stdout + stderr\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"4. 1.1 Chạy nhiều lệnh liên tiếp: "},{"type":"text","marks":[{"type":"code"}],"text":"&&"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"npm install && npm run build && npm start\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"5. Tạo alias (Linux/macOS)"}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"Thêm vào "},{"type":"text","marks":[{"type":"code"}],"text":"~/.zshrc"},{"type":"text","text":" hoặc "},{"type":"text","marks":[{"type":"code"}],"text":"~/.bashrc"},{"type":"text","text":":"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"alias ll=\"ls -lah\"\nalias gs=\"git status\"\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"XIII. Windows: dùng gì tương đương?"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"1. PowerShell vs CMD"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"PowerShell"},{"type":"text","text":" hiện đại hơn, nhiều tính năng hơn (khuyên dùng)."}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"CMD"},{"type":"text","text":" đơn giản, lệnh hơi khác."}]}]}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"2. Một số lệnh Windows tương đương (PowerShell)"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"pwd # Get-Location\nls # Get-ChildItem\ncd # Set-Location\ncat file.txt # Get-Content\nmkdir test # New-Item -ItemType Directory test\nrm file.txt # Remove-Item file.txt\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":3},"content":[{"type":"text","text":"3. Xem port trên Windows"}]},{"type":"codeBlock","attrs":{"language":null},"content":[{"type":"text","text":"netstat -ano | findstr :3000\ntaskkill /PID 12345 /F\n"}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"XIV. Kết luận"}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"Bạn không cần thuộc hết mọi lệnh ngay từ đầu. Chỉ cần nắm “xương sống”: "},{"type":"text","marks":[{"type":"code"}],"text":"cd"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"ls"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"mkdir"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"touch"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"cp"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"mv"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"rm"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"cat/less"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"grep/find"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"tail -f"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"curl"},{"type":"text","text":", "},{"type":"text","marks":[{"type":"code"}],"text":"ps/kill"},{"type":"text","text":". Khi làm dự án thật, bạn sẽ gặp lệnh nào dùng lệnh đó và nhớ rất nhanh. Quan trọng nhất là thói quen kiểm tra kỹ trước các lệnh có tính “phá hủy” như "},{"type":"text","marks":[{"type":"code"}],"text":"rm -rf"},{"type":"text","text":" hoặc "},{"type":"text","marks":[{"type":"code"}],"text":"kill -9"},{"type":"text","text":"."}]},{"type":"heading","attrs":{"textAlign":null,"level":2},"content":[{"type":"text","text":"Tài liệu tham khảo"}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.gnu.org/software/bash/manual/","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"https://www.gnu.org/software/bash/manual/"},{"type":"hardBreak"},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://man7.org/linux/man-pages/","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"https://man7.org/linux/man-pages/"},{"type":"hardBreak"},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://developer.apple.com/library/archive/documentation/OpenSource/Conceptual/ShellScripting/","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"https://developer.apple.com/library/archive/documentation/OpenSource/Conceptual/ShellScripting/"},{"type":"hardBreak"},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://learn.microsoft.com/en-us/powershell/","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"https://learn.microsoft.com/en-us/powershell/"},{"type":"hardBreak"},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://curl.se/docs/","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"https://curl.se/docs/"}]}]}