Open at-vunguyen opened 6 years ago
$ sudo apt install git
$ sudo apt remove git
$ sudo apt update & sudo apt upgrade
$ sudo dpkg -l
$ ls -al
$ sudo chmod -R <permission> <file/folder> $ sudo chmod -R 675 test/
$ sudo chmod -R <permission> <file/folder>
$ sudo chmod -R 675 test/
$ history | grep cd Phân tách giữa 2 câu lệnh kết quả câu lệnh 1 là tham số cho lệnh 2
$ history | grep cd
$ ps Kiểm tra các quá trình đang chạy
$ ps
$ ls <option> <directory> $ ll or $ ll -a Show toàn bộ file và đường dẫn
$ ls <option> <directory>
$ ll or $ ll -a
$ pwd Lấy đường dẫn hiện tại
$ pwd
$ cd Đi đến một đường dẫn
$ cd
$ cat Xem nội dung của file
$ cat
cp SOURCE DIRECTORY_DES Sao chép file
cp SOURCE DIRECTORY_DES
mv SOURCE DIRECTORY_DES or mv [filename] [new_filename] Di chuyển file hoặc đổi tên
mv SOURCE DIRECTORY_DES or mv [filename] [new_filename]
$ mkdir <name_directory> Tạo một thư mục mới
$ mkdir <name_directory>
$ rm <name_file> Xóa file
$ rm <name_file>
$ touch Tạo file
$ touch
$ nano newfile1.txt Mở file bằng trình soạn thảo editor
$ nano newfile1.txt
$ tail <file> Xem một phần nội dung của file
$ tail <file>
$ vim <file> Mở file bằng trình soạn thảo Vim
$ vim <file>
$ sudo su Đăng nhập vào user root
$ sudo su
$ find <filename/directoryname> Tìm kiếm file hoặc thư mục
$ find <filename/directoryname>
$ grep <string> <file> Tìm kiếm xâu trong file
$ grep <string> <file>
$ ifconfig
$ netstat
$ sudo useradd -m -c 'Vu NV' vunv Tạo user mới
$ sudo useradd -m -c 'Vu NV' vunv
$ sudo passwd <pass>
$ sudo userdel vunv
$ sudo groupadd phpteam
$ sudo usermod -a -G phpteam vungv
$ sudo grooupdel phpteam
@at-vunguyen
1. INSTALL SOFTWARE
$ sudo apt install git
2. REMOVE SOFTWARE
$ sudo apt remove git
3. UPDATE SOFTWARE IN COMMAND
$ sudo apt update & sudo apt upgrade
4. LIST ALL PACKAGE INSTALLED
$ sudo dpkg -l
5 LIST FILES IN DIRECTORY
$ ls -al
6. UPDATE PERMISSION FOR FILE/FODER
$ sudo chmod -R <permission> <file/folder>
$ sudo chmod -R 675 test/
7. The | symbol
$ history | grep cd
Phân tách giữa 2 câu lệnh kết quả câu lệnh 1 là tham số cho lệnh 28. Listing all processes
$ ps
Kiểm tra các quá trình đang chạy9.Listing file and directory
$ ls <option> <directory>
$ ll or $ ll -a
Show toàn bộ file và đường dẫn10. Get current directory
$ pwd
Lấy đường dẫn hiện tại11. Go to directory
$ cd
Đi đến một đường dẫn12. Show file content
$ cat
Xem nội dung của file13. Copy file
cp SOURCE DIRECTORY_DES
Sao chép file14. Move file or rename file
mv SOURCE DIRECTORY_DES or mv [filename] [new_filename]
Di chuyển file hoặc đổi tên15. Make directory
$ mkdir <name_directory>
Tạo một thư mục mới16. Remove file
$ rm <name_file>
Xóa file17. Create file
$ touch
Tạo file18. Open file in nano editor
$ nano newfile1.txt
Mở file bằng trình soạn thảo editor19. Show the tail file
$ tail <file>
Xem một phần nội dung của file20. Open file in Vim editor
$ vim <file>
Mở file bằng trình soạn thảo Vim21. Login to root user
$ sudo su
Đăng nhập vào user root22. Search file or directory
$ find <filename/directoryname>
Tìm kiếm file hoặc thư mục23. Find string in file
$ grep <string> <file>
Tìm kiếm xâu trong file24. Show network information
$ ifconfig
25. Show information and statistics about protocols
$ netstat
26. Create user
$ sudo useradd -m -c 'Vu NV' vunv
Tạo user mới27. Set password for user
$ sudo passwd <pass>
28. Delete user
$ sudo userdel vunv
29. Create new group
$ sudo groupadd phpteam
30. Add user into group
$ sudo usermod -a -G phpteam vungv
31. Delete group
$ sudo grooupdel phpteam