- Bài viết này được thực hiện trên Debian 13 Trixe KDE Plasma
Đưa user hiện tại làm root
sudo nano /etc/sudoesr- Kéo tới dòng này, thêm vào ở dưới root tên user của bạn để cấp full quyền root
- Nếu không thì user
lcaohoanqsẽ không thể cài, update package được
# User privilege specificationroot ALL=(ALL:ALL) ALLlcaohoanq ALL=(ALL:ALL) ALLMount ổ cứng
- Hiện tại mình đang dùng 2 ổ cứng, 1 ổ SSD boot + 1 ổ NVME data
- Check thông tin
❯ sudo blkid
/dev/nvme0n1p1: LABEL="DATA" UUID="26a0de97-0abd-45e1-b610-129d3045f430" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Basic data partition" PARTUUID="3aec2ba0-c66e-01db-d015-761d37e3ed00"/dev/sda5: UUID="9eacdd7d-3177-4e92-a812-63e0abaade65" TYPE="swap" PARTUUID="f6b8904f-05"/dev/sda1: UUID="2c9bf3d9-8c80-4d4d-8632-4b10e65726d3" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f6b8904f-01"- Gọn hơn, xem dung lượng và
UUIDcủa ổ
❯ lsblk -o NAME,SIZE,UUIDNAME SIZE UUIDsda 223.6G├─sda1 212.2G 2c9bf3d9-8c80-4d4d-8632-4b10e65726d3├─sda2 1K└─sda5 11.4G 9eacdd7d-3177-4e92-a812-63e0abaade65nvme0n1 238.5G└─nvme0n1p1 238.5G 26a0de97-0abd-45e1-b610-129d3045f430-
Mình muốn mount ổ /dev/nvme0n1p1 -> /media/data, mình cần 4 thông tin
- UUID của ổ
- destination -> /media/data
- định dạng phân vùng -> ext4
- defaults 0 2 ->
- 0: Liên quan tới tool
dump(backup kiểu cổ)0= không backup1= có backupdumpgần như không còn dùng
- 2: fsck (file system check)
- Nó quyết định thứ tự kiểm tra filesystem khi boot.
- 0 -> không kiểm tra
- 1 -> kiểm tra đầu tiên, chỉ dành cho root /
- 2 -> kiểm tra sau root -> Dùng cho disk phụ
- 0: Liên quan tới tool
-
Gom lại ta được lệnh:
UUID=26a0de97-0abd-45e1-b610-129d3045f430 /media/data ext4 defaults 0 2 -
Bắt đầu mount, vào fstab
sudo nano /etc/fstab- Kiểm tra thông tin, và thêm vào dòng cuối cùng
# /etc/fstab: static file system information.## Use 'blkid' to print the universally unique identifier for a# device; this may be used with UUID= as a more robust way to name devices# that works even if disks are added and removed. See fstab(5).## systemd generates mount units based on this file, see systemd.mount(5).# Please run 'systemctl daemon-reload' after making changes here.## <file system> <mount point> <type> <options> <dump> <pass># / was on /dev/sda1 during installationUUID=2c9bf3d9-8c80-4d4d-8632-4b10e65726d3 / ext4 errors=remount-ro 0 1# swap was on /dev/sda5 during installationUUID=9eacdd7d-3177-4e92-a812-63e0abaade65 none swap sw 0 0
UUID=26a0de97-0abd-45e1-b610-129d3045f430 /media/data ext4 defaults 0 2- Lưu thay đổi, thường sau khi
sudo mount -athường bắt deamon reload, chú ý nhìn output của terminal và làm theo nhé
# apply without rebootingsudo mount -a# If meet any error about no mount directory found, just need to reboot- Check lại
# verify mountingdf -h
# hoặc xài dufdufCác phần mềm CLI mình hay cài
- Cài một lần luôn cho khỏe
- Mình đang xài Debian nên dùng apt nhé
- Đối với các package phổ biến
sudo apt install \ zsh \ # shell kitty \ # terminal bat \ # cat xịn hơn eza \ # ls xịn hơn fzf \ # file & search zoxide \ # cd xịn hơn fastfetch \ htop \ btop \ duf \ # du df xịn hơn xclip \ # copy paste với clipboard ranger \ # thao tác file trong terminal byobu \ # tmux xịn hơn fd-find \ ripgrep \ # search recursive directories tmux \ # terminal multiplexer pipx \- zoxide
eval "$(zoxide init zsh)"- fd: rename thành fd để tránh trùng tên với package khác, tạo symlink
sudo ln -s $(which fdfind) /usr/local/bin/fd# fdfind --versionfd --version-
lazydocker: Quản lý docker trong terminal
-
Cài đặt:
Terminal window curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash -
Config thêm alias trong ~/.zshrc
Terminal window echo "alias lzd='lazydocker'" >> ~/.zshrcsource ~/.zshrc
-
yazi: Tương tự ranger, nhưng nhanh hơn (viết bằng Rust)
- Repo: https://github.com/sxyazi/yazi
- Cài đặt: https://lindevs.com/install-yazi-on-ubuntu, yazi không có package apt chính thức, cách cài dùng binary copy vào
/usr/local/bin
Terminal window # Download the latest release of Yazi from GitHub:wget -qO yazi.zip https://github.com/sxyazi/yazi/releases/latest/download/yazi-x86_64-unknown-linux-gnu.zip# Extract files to temporary directory:unzip -q yazi.zip -d yazi-temp# Move executables to /usr/local/bin directory: (ya command is used for Yazi plugins management)sudo mv yazi-temp/*/{ya,yazi} /usr/local/bin# Check versionyazi --version# Remove temporary directory and downloaded archive:rm -rf yazi-temp yazi.zip -
tldr: Tương tự man, gọn hơn dễ đọc
- Repo: https://github.com/tldr-pages/tldr
- Cài đặt
Terminal window npm i -g tldr# sử dụng tldr yazi thoi -
maven
sudo apt install maven default-jdk- Test lại đã cài được chưa
mvn --versionApache Maven 3.9.9Maven home: /usr/share/mavenJava version: 21.0.9, vendor: Debian, runtime: /usr/lib/jvm/java-21-openjdk-amd64Default locale: en_US, platform encoding: UTF-8OS name: "linux", version: "6.12.57+deb13-amd64", arch: "amd64", family: "unix"java --versionopenjdk 21.0.9 2025-10-21OpenJDK Runtime Environment (build 21.0.9+10-Debian-1deb13u1)OpenJDK 64-Bit Server VM (build 21.0.9+10-Debian-1deb13u1, mixed mode, sharing)- Tham khảo thêm ở đây
Nodejs
# Download and install nvm:curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# in lieu of restarting the shell\. "$HOME/.nvm/nvm.sh"
# Download and install Node.js:nvm install 22
# Verify the Node.js version:node -v # Should print "v22.21.1".
# Verify npm version:npm -v # Should print "10.9.4".- Cài thêm pnpm, yarn, bun
npm i -g pnpm yarn bunDevOps
- Doppler cho secret management: https://docs.doppler.com/docs/install-cli
.secret.baseline
- Chặn commit .env (https://github.com/Yelp/detect-secrets/tree/master/docs)
pipx install detect-secrets # hoặc venv nếu bạn muốnpre-commit install # cài git hooks- Cần có 3 file commit trên repo
.pre-commit-config.yaml.secrets.baseline.gitignore
Team Setup
pipx install detect-secretspipx ensurepathpre-commit installCommit bất kỳ có secrets → sẽ bị chặn. Nếu bị false positive:
detect-secrets scan > .secrets.baselinegit add .secrets.baselinegit commit -m "Update baseline"vim, neovim, lazyVim
# Pre-built archives# The Releases page provides pre-built binaries for Linux systems.
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gzsudo rm -rf /opt/nvim-linux-x86_64sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz- Then add this to your shell config (~/.bashrc, ~/.zshrc, …):
export PATH="$PATH:/opt/nvim-linux-x86_64/bin"- Install Lazyvim (https://www.lazyvim.org/installation)
- LazyVim require v10 above to install
- Cài Thêm Trong LazyExtras để support nhiều ngôn ngữ + tools
Docker
- Theo guide là được, chỉ cài Docker Engine https://docs.docker.com/engine/install/debian/
- Check cài thành công
sudo docker run hello-world- Nhưng xài lệnh
docker psthì không được
docker: Got permission denied while trying to connectto the Docker daemon socket at unix:///var/run/docker.sock:Post http://%2Fvar%2Frun%2Fdocker.sock/v1.35/containers/create:dial unix /var/run/docker.sock: connect: permission denied.See 'docker run --help'.-
100% mình cài mới là bị, do user hiện tại chưa được add vào group docker, cách fix Docker: Permission denied
-
Mình chạy thêm vài container utility nữa docker-compose
- portainer: rất tiện, mình hay triển khai trên server thực tế
- dozzle (8888): check log đẹp hơn, đỡ docker logs -f
- postgres
SSH
GitHub
mkdir ~/.ssh
# or i have my own .ssh key, i have created beforecp .ssh/ /home/lcaohoanq/.ssh/ -r# Ensure ssh-agent is enabledsudo pacman -S openssh# The command starts the ssh-agent in the backgroundeval "$(ssh-agent -s)"- Notice that if the .pub key have differ name need to specify the absolute path ssh-add /home/username/.ssh/id_xxxxx
ssh-add id_xxxxx
# If meet the key are too opensudo chmod 400 /home/lcaohoanq/.ssh/id_xxxxx
# If meet permission denied when ssh-addsudo chown lcaohoanq:lcaohoanq ~/.ssh/id_xxxxx
# Verifyssh -T git@github.comGitLab
- Giống y chang ở trên, đổi lệnh cuối thành
gitlab
ssh -T git@gitlab.comBộ gõ
- Mình dùng fcitx5
sudo apt install fcitx5 libfcitx5-qt-data fcitx5-config-qt fcitx5-unikey fcitx5-material-color fcitx5-anthy-
Add thêm
Unikeyvào nhé (dưới Keyboard - English US)Anthynếu gõ tiếng Nhật
-
Default chuyển ngôn ngữ
Ctrl + Space, mình đổi quaCtrl + Left Shift -
Ngoài ra các bạn có thể tham khảo thêm bộ ibus-bamboo, dự án đã dừng phát triển ở repo gốc, hiện đang có những dev đang fork maintain
sudo apt updatesudo apt install ibus ibus-unikey ibus-anthy
# start ibus-daemonibus-daemon -drx
# set ibus is default input methodim-config -n ibusShortcut
- Kitty: Meta + Return = Super + Enter
System Settings
App & Windows - Window Management - Virtual Desktops
- Add desktop -> 3 Row 1,2,3
- Thêm xong thì mở rộng không gian ra 3 cửa sổ, có thể lăn chuột vào để đổi desktop (ở taskbar) hoặc Ctrl + Meta + Left/Right (Arrow)
Grub
- Mình xài qua 2 bộ, mì ăn liền dễ xài là của Chris Titus Tech
- Làm theo hướng dẫn là được, rất dễ: https://christitus.com/bootloader-themes/
- Hardcode hơn chút thì Minegrub https://github.com/Lxtharia/minegrub-theme’

cd Downloads &&git clone https://github.com/Lxtharia/minegrub-theme.git &&cd minegrub-theme &&
# Im just too lazy too config just apply the install, high risk high return boys <3sudo ./install_theme.sh- Lưu thay đổi và reboot
sudo grub-mkconfig -o /boot/grub/grub.cfgzsh config
- Mình dùng oh-my-zsh, nhớ cài zsh trước nhen
sudo apt-get install zsh curl && sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"-
Sau khi cài xong thì mình có
~/.zshrcđể config, default thì đa số comment lại, mình sẽ overview các nhóm các bạn cần sửa- Theme: oh-my-zsh có built-in theme cũng đẹp rồi nhưng mình thích dùng [powerlevel10k] hơn (https://github.com/romkatv/powerlevel10k)
- Plugins: rất nhiều plugin, tham khảo ở đây https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins
- Alias: shortcut lệnh
-
Config của mình, các bạn tham khảo nhé https://github.com/lcaohoanq/dotfiles/blob/stow/.zshrc_debian13
- Chú ý có các plugin này cần phải clone về nha
# zsh-syntax-highlightinggit clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# zsh-autosuggestionsgit clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# fzf-tabgit clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tabkitty config
Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"- Set path
echo >> /home/lcaohoanq/.zshrcecho 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/lcaohoanq/.zshrceval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"- Cài thêm GCC
brew install gccAWS CLI
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzip awscliv2.zipsudo ./aws/install❯ aws --versionaws-cli/2.32.20 Python/3.13.11 Linux/6.12.57+deb13-amd64 exe/x86_64.debian.13spotifty
- Cài qua snapd, mạng mạnh nhưng lần nào tải đều rất lâu
cloudflare warp client
zalo
- Bản cài port từ .dmg trên macOS (https://github.com/ducseul/zalo-linux-unofficial)
git clone https://github.com/ducseul/zalo-linux-unofficial.git && cd zalo-linux-unofficial && bash install.sh- Không sync lần đầu đăng nhập được, còn mọi tính năng ngon lành
easy effect
- Nghe nhạc hay hơn
- https://github.com/wwmm/easyeffects
sudo apt install easyeffectsbash -c "$(curl -fsSL https://raw.githubusercontent.com/JackHack96/PulseEffects-Presets/master/install.sh)"Thunnar File Manager
- Cài thêm hỗ trợ preview ảnh iphone HEIC
sudo apt install libheif-examples gstreamer1.0-plugins-bad heif-gdk-pixbufGỡ cài đặt
- Konsole, XTerm
Direnv
- Tự động load .env khi cd vào project, ứng dụng trong lúc mình chạy mvn spring-boot
thì nó inject .env runtime luôn
sudo apt install direnv- Trong thư mục project thêm .envrc với nội dung:
echo 'dotenv' > .envrcdirenv allow- Mở ~/.zshrc thêm vào:
eval "$(direnv hook zsh)"- Reload
source ~/.zshrc- Check load được .env chưa
❯ direnv statusdirenv exec path /usr/bin/direnvDIRENV_CONFIG /home/lcaohoanq/.config/direnvbash_path /usr/bin/bashdisable_stdin falsewarn_timeout 5swhitelist.prefix []whitelist.exact map[]Loaded RC path /media/data/do-an/bit-learning-be/.envrcLoaded watch: ".envrc" - 2025-12-28T15:27:13+07:00Loaded watch: "../../../../home/lcaohoanq/.local/share/direnv/allow/ee9b5cabee7b12419963b71760e247b9627d3f25976e39b6eec94126f4a206ec" - 2025-12-28T15:27:13+07:00Loaded watch: ".env" - 2025-12-26T08:27:45+07:00Loaded RC allowed falseLoaded RC allowPathFound RC path /media/data/do-an/bit-learning-be/.envrcFound watch: ".envrc" - 2025-12-28T15:27:13+07:00Found watch: "../../../../home/lcaohoanq/.local/share/direnv/allow/ee9b5cabee7b12419963b71760e247b9627d3f25976e39b6eec94126f4a206ec" - 2025-12-28T15:27:13+07:00Found RC allowed trueFound RC allowPath /home/lcaohoanq/.local/share/direnv/allow/ee9b5cabee7b12419963b71760e247b9627d3f25976e39b6eec94126f4a206ec