/*auto readmore*/ /*auto readmore*/ /* an hien script*/ // an hien password /*an hien ma chuong trinh cong tru */ /*Scrollbox thanh cuon*/ /***Nhung CODE***/ /* dòng xanh dòng trắng */ /* https://cdnjs.com/libraries/prism lay thu vien, can vao ten file ma goi 1. copy link vao vi du:prism-python.min.js 2. ten ngon nua la python */ /*=== New posts ===*/ /*header slider*/ /*=== bai viet lien quan===*/ /*===tabcode===*/
Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Basic Shell Script In Linux/Ubuntu/CentOS - P1

Trong windows chúng ta có batch file, trong linux có Shell Script. Nói chung shell là chương trình có thể tương tác người dùng, có thể input dữ liệu, có thể output ra màn hình, có thể tự động thực thi một nhóm lệnh do chúng ta tạo ra theo một lịch trình đã thiết lập. 1. Cách tạo và thực thi một chương trình shell Tạo file hello.sh với nội dung: #!/bin/bashecho "hello world" (...)

Network Configuration In Linux/Ubuntu >= 17.4

1. Các file cấu hình: Network interface - Debian-based: /etc/network/interfaces- Red Hat-based: /etc/sysconfig/network-scripts/- Ubuntu (>= 17.04): /etc/netplan/ DNS server: /etc/resolv.conf /etc/nsswitch.conf Ví dụ: Kiểm tra thông tin IP hiện tại với lệnh: ip a khanhvc@ubutu:~$ ip a (...)

Using Commands Cat, Head, Tail, Less & More In Linux/Ubuntu/CentOS

Mục Lục: 1. Lệnh Cat2. Lệnh Head3. Lệnh Tail4. Lệnh Less5. Lệnh More Nội Dung: 1. Lệnh Cat: Dùng để đọc, và xem nội dung của file Command Giải Thích cat /etc/passwd Hiển thị nội dung file passwd (...)

AWK Command In Linux/Ubuntu/CentOS

Command Giải Thích Kết Quả echo "Linux commands" | awk '{$2="DONG LENH";print $0}' Thay đổi nội dung của cột thứ 2 của chuỗi "Linux command" trong lệnh echo thành "DONG LENH"(...)

Sed Command in Linux/Ubuntu/CentOS - Tìm Kiếm & Thay Thế

Mục Lục1. Cài đặt Sed 2. Ví dụ Nội Dung: 1. Cài đặt Sed sudo apt-get install sed Kiểm tra version sau khi cài đặt sed --version 2. Ví dụ Command Giải Thích sed 1s/thu/THU/g file.txt Tìm chữ "thu" ở dòng thứ 1 của file có tên file.txt, thay(...)

Security Fundamentals In Linux/Ubuntu/CentOS

  Command Giải Thích su itsupport Switch user sang user itsupport, vẫn đứng tại thư mục hiện tại su - itsupport (...)

Basic Regular Expression In Linux/Ubuntu/CentOS

Mục Lục1. Regular Expression Căn Bản2. Ví dụ:Nội dung:1. Regular Expression Căn Bản Ký Hiệu Giải Thích . Bất kỳ ký tự nào + (...)

File/Directory Permission In Linux/Ubuntu/CentOS

Mục lục 1. File type (căn cứ vào ký tự đầu tiên)2. Nhóm phân quyền trong Linux - Ownership:3. Kiểm soát quyền truy cập - Permission:4. Thay đổi permission - chmod5. Thay đổi permission - chmod bằng cơ số 6. Defaulf permission - umask Nội dung 1. File type (căn cứ vào ký tự đầu tiên) (...)

Account Management In Linux/Ubuntu/CentOS

Mục lục1. Tạo mới Group/User 2. Thêm/xóa user trong group 3. Profiles/Policies cho User Nội dung: 1. Tạo mới Group, User mới Commands Diễn Giải cat /etc/group Kiểm tra các group hiện tại đang tồn tại trên hệ thống (...)

Hard Links & Symbolic Links In Linux/Ubuntu/CentOS

Khi một file hoặc folder được tạo ra trong Linux nó sẽ tạo ra 1 số cho file hoặc folder đó. Số đó gọi là INODE và đây là dãy số duy nhất trên hệ thống của Linux nhằm mục đích quản lý.  Ví dụ: khanhvc@ubutu:~/projects$ ll -i total 12 2621505 drwxrwxr-x  3 khanhvc khanhvc 4096 Thg 9  23 14:05 ./ (...)

Basic File Editing - Vim In Linux/Ubuntu/CentOS

Nội dung 1. Cài đặt Vim 2. Vim modes 3. Saving Changes 4. Moving File 5. Cut, Copy & Paste 6. Searching 7. Replace 8. Specials 9. Others Commands 1. Cài đặt VimUbuntu: sudo apt install wim CentOS: sudo yum install vim 2. Vim modes Command Mode Insert Mode Visual Mode   3. Saving Changes (...)

Regular Expression In Linux/Ubuntu/CentOS

Nội dung: Tạo Regular Expression (RegEx) đơn giản Sự khác nhau giữa RegEx căn bản và RegEx extended (Egrep) Commands 1. Grep - Global RegEx: In ra dòng nếu tìm thấy mẫu (patterns) Cú Pháp Ví Dụ Giải Thích grep(...)

Using Streams, Pipes & Redirects - STDOUT/STDIN/STDERR In Linux/Ubuntu/CentOS

Nội dung:Redirecting standard input/output/errorPipe: dữ liệu output của command này trở thành dữ liệu input của command khácSử dung output của command như là argument của command khácĐẩy output của command đến stdout và log fileCommand  Lệnh Giải Thích Ví Dụ > (...)

Basic File Management In Linux / Quản Lý File Căn Bản Trong Linux

 Nội dung: Copy, duy chuyển và xóa file và thư mụcCopy nhiều file, nhiều thư mục với đệ qui (recursively)Xóa file, thư mục đệ quiTìm kiếm Command Lệnh Giải Thích Ví Dụ mkdir tạo thư mục mới (...)

History Commands In Linux/Ubuntu/CentOS - Lệnh History Trên Linux

Ví Dụ Giải Thích history hiển thị các câu lệnh user đã thực hiện trước đó history 3 hiển thị 3 câu lệnh gần nhất !! Thực hiện lại câu lệnh gần nhất !101 thực hiện lại câu lệnh có số thứ tự là 101 !systemctl thực hiện lại câu lệnh cuối cùng bắt đầu bằng chuỗi "systemctl" history | grep date hiển thị các câu lệnh đã thực thi có chuỗi "date" history -w ghi lịch sử vào file users ~/.bash_history history -c xóa lịch sử các câu lệnh đã thực hiện history -d 101 xóa(...)

Basic Shell Commands In Linux/Ubuntu/CentOS - Các Lệnh Shell Cơ Bản Trong Linux - Ubuntu

Mục lục: 1. Mở terminal trong Linux 2. Trợ giúp trong linux 3. Các phím tắt cơ bản 4. Các lệnh cơ bản 5. Các biến môi trường Nội dung: 1. Mở terminal trong Linux 2. Trợ giúp trong linux Man page: Để xem các tùy chọn các lệnh cụ thể,  Ví dụ: man ls  Trong đó:  - man: là từ khóa - ls: là lệnh cần(...)

CentOS, Cài Đặt Ngày Giờ Trên CentOS

Yêu cầu: 1. Cài đặt thủ công 2. Cài đặt thông qua NTP - Network Time Protocol Thực hiện: 1. Cài đặt thủ công Kiểm tra trước khi cài đặt [root@CentOS ~]# timedatectl status       Local time: Wed 2020-06-17 08:15:01 IST   Universal time: Wed 2020-06-17 01:15:01 UTC         RTC time: Wed 2020-06-17 01:15:01        Time zone: Asia/Kolkata (IST, +0530)      NTP enabled: no NTP synchronized: no  RTC in local TZ: no       DST active: n/a [root@CentOS ~]#  Noted: Trước khi chỉnh ngày giờ chúng(...)
/*header slide*/