Software, settings, next steps · Phần mềm, cài đặt, bước tiếp theo
Installing software
- On Linux you rarely download installers. A package manager fetches and installs software for you.
- Debian and Ubuntu use
apt; Fedora usesdnf; macOS users often addbrew:
- One command, and the tool (and anything it needs) is installed and ready.
Cài đặt phần mềm
- Trên Linux, bạn hiếm khi tải trình cài đặt. Một trình quản lý gói (package manager) sẽ lấy và cài đặt phần mềm cho bạn.
- Debian và Ubuntu dùng
apt; Fedora dùngdnf; người dùng macOS thường thêmbrew:
sudo apt update
sudo apt install git
- Chỉ một câu lệnh, và công cụ (cùng mọi thứ nó cần) đã được cài đặt sẵn sàng.
Installing with a package manager · Cài đặt với trình quản lý gói
apt update refreshes the catalogue, apt install fetches the tool and its needs. · apt update cập nhật danh mục, apt install tải công cụ và các phụ thuộc của nó.
The environment
- The shell remembers settings in environment variables. The most important is
PATH— the list of folders it searches for commands. - Your personal settings live in a file called
.bashrcin your home folder. Editing it lets you create shortcuts (aliases) and change how the shell behaves.
Môi trường (Environment)
- Shell ghi nhớ các cài đặt trong biến môi trường. Quan trọng nhất là
PATH— danh sách các thư mục nó tìm kiếm lệnh. - Cài đặt cá nhân của bạn nằm trong một file tên là
.bashrctrong thư mục home. Chỉnh sửa file này giúp bạn tạo phím tắt (aliases) và thay đổi cách shell hoạt động.
Where to go next
- You now know how to navigate, read, search, combine, and manage files — the core of the command line.
- Keep a real terminal open and use it for small tasks; speed comes with habit.
- Next steps: learn
gitfor version control, a text editor likenanoorvim, and a little shell scripting to automate your favourite commands. Well done!
Bước tiếp theo
- Bạn đã biết cách điều hướng, đọc, tìm kiếm, kết hợp và quản lý tập tin — cốt lõi của dòng lệnh.
- Giữ một terminal thật mở và sử dụng nó cho các tác vụ nhỏ; tốc độ đến từ thói quen.
- Các bước tiếp theo: học
gitđể kiểm soát phiên bản, một trình soạn thảo văn bản nhưnanohoặcvim, và một chút viết script shell để tự động hóa các lệnh yêu thích của bạn. Làm tốt lắm!
Now you try
aptneeds the real internet, so it is not in our simulator — but a list of installed packages is saved ininstalled.txt.- Use the tools from this course to
sortthe list andwcto count it. The same handful of commands work on any text data.
Bây giờ bạn thử
aptcần mạng internet thật, nên nó không nằm trong mô phỏng của chúng tôi — nhưng danh sách các gói đã cài đặt được lưu tronginstalled.txt.- Sử dụng các công cụ từ khóa học này để
sortdanh sách vàwcđếm số lượng. Một vài lệnh cơ bản hoạt động trên mọi dữ liệu văn bản.
Common mistakes
- Read a command's
--helpormanpage before using unfamiliar options. - Test a risky command on a copy of your files first.
Lỗi thường gặp
- Đọc trang
--helphoặcmancủa một lệnh trước khi sử dụng các tùy chọn chưa quen thuộc. - Thử nghiệm một lệnh rủi ro trước trên bản sao của tập tin.
apt list --installed is a real command, not part of our simulator — but here its output is saved in installed.txt. Put the package names in alphabetical order with sort installed.txt. · apt list --installed là một lệnh thật, không phải phần của mô phỏng này — nhưng ở đây đầu ra của nó được lưu trong installed.txt. Sắp xếp tên gói theo thứ tự bảng chữ cái bằng sort installed.txt.
How many packages are installed? Count the lines with cat installed.txt | wc -l — the same file tools work on any data. · Có bao nhiêu gói đã được cài đặt? Đếm số dòng có cat installed.txt | wc -l — cùng một công cụ file hoạt động trên mọi dữ liệu.