AT-PHPIntership / server-practice

0 stars 2 forks source link

S1-Nguyen Van Vu #9

Open at-vunguyen opened 6 years ago

at-vunguyen commented 6 years ago

1. INSTALL SOFTWARE

$ sudo apt install git

screenshot from 2018-06-14 11-31-32

2. REMOVE SOFTWARE

$ sudo apt remove git

screenshot from 2018-06-14 11-34-20

3. UPDATE SOFTWARE IN COMMAND

$ sudo apt update & sudo apt upgrade

screenshot from 2018-06-14 11-36-28

4. LIST ALL PACKAGE INSTALLED

$ sudo dpkg -l

screenshot from 2018-06-14 11-47-50

5 LIST FILES IN DIRECTORY

$ ls -al

screenshot from 2018-06-14 11-49-11

6. UPDATE PERMISSION FOR FILE/FODER

$ sudo chmod -R <permission> <file/folder> $ sudo chmod -R 675 test/

screenshot from 2018-06-14 11-55-51

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 2

screenshot from 2018-06-14 11-56-59

8. Listing all processes

$ ps Kiểm tra các quá trình đang chạy

screenshot from 2018-06-14 11-58-46

9.Listing file and directory

$ ls <option> <directory> $ ll or $ ll -a Show toàn bộ file và đường dẫn

screenshot from 2018-06-14 12-01-07

10. Get current directory

$ pwd Lấy đường dẫn hiện tại

screenshot from 2018-06-14 12-02-47

11. Go to directory

$ cd Đi đến một đường dẫn

screenshot from 2018-06-14 12-05-31

12. Show file content

$ cat Xem nội dung của file

screenshot from 2018-06-14 12-19-52

13. Copy file

cp SOURCE DIRECTORY_DES Sao chép file

screenshot from 2018-06-14 12-23-08

14. Move file or rename file

mv SOURCE DIRECTORY_DES or mv [filename] [new_filename] Di chuyển file hoặc đổi tên

screenshot from 2018-06-14 12-26-04

15. Make directory

$ mkdir <name_directory> Tạo một thư mục mới

screenshot from 2018-06-14 12-27-05

16. Remove file

$ rm <name_file> Xóa file

screenshot from 2018-06-14 12-27-52

17. Create file

$ touch Tạo file

screenshot from 2018-06-14 12-29-17

18. Open file in nano editor

$ nano newfile1.txt Mở file bằng trình soạn thảo editor

screenshot from 2018-06-14 12-32-20

19. Show the tail file

$ tail <file> Xem một phần nội dung của file

screenshot from 2018-06-14 12-33-14

20. Open file in Vim editor

$ vim <file> Mở file bằng trình soạn thảo Vim

screenshot from 2018-06-14 12-34-23

21. Login to root user

$ sudo su Đăng nhập vào user root

screenshot from 2018-06-14 12-37-36

22. Search file or directory

$ find <filename/directoryname> Tìm kiếm file hoặc thư mục

screenshot from 2018-06-14 12-45-46

23. Find string in file

$ grep <string> <file> Tìm kiếm xâu trong file

screenshot from 2018-06-14 12-47-36

24. Show network information

$ ifconfig screenshot from 2018-06-14 12-48-18

25. Show information and statistics about protocols

$ netstat

screenshot from 2018-06-14 12-49-18

26. Create user

$ sudo useradd -m -c 'Vu NV' vunv Tạo user mới

screenshot from 2018-06-14 12-50-48

27. Set password for user

$ sudo passwd <pass>

screenshot from 2018-06-14 12-51-34

28. Delete user

$ sudo userdel vunv

screenshot from 2018-06-14 12-52-49

29. Create new group

$ sudo groupadd phpteam

screenshot from 2018-06-14 12-53-26

30. Add user into group

$ sudo usermod -a -G phpteam vungv

screenshot from 2018-06-14 12-55-46

31. Delete group

$ sudo grooupdel phpteam screenshot from 2018-06-14 12-56-27

ghost commented 6 years ago

@at-vunguyen