29 The Linux command requires you to know

All Linux distributions have user interface support to interact with the computer. However, in some cases, using the command line interface to control the computer will be faster and simpler.

In the command line interface, the commands are used to instruct the computer to perform a certain task. You can use the command to turn off the computer, view the list of files in the directory, copy files, move and delete files, etc.

Below I will list common Linux commands so that new Linux users or Linux administrators can easily learn and look up.

1. ls – List

ls lists content (files and directories) in the current directory. It is similar to opening a folder and viewing content in it on the user interface.

Học lập trình trực tuyến

2. mkdir – Make Directory

mkdir <new folder name> create a new folder. It is similar to choosing new / create directory to create a new directory on the user interface.

Học lập trình trực tuyến xin việc làm

3. pwd – Print Working Directory

pwd prints the full path to the current directory.

Học lập trình trực tuyến cấp tốc

4. cd – Change Directory

cd <directory> converts a directory into the current directory for the current session. It is similar to opening a folder and manipulating the files and folders within that user interface.

Học lập trình trực tuyến cho trẻ em

5. rmdir – Remove Directory

rmdir <directory> delete a directory.

Học lập trình trực tuyến cho thanh niên thất nghiệp

6. rm – Remove

rm <file name> delete file. You can also use rm -r <directory name> to delete directories and all data in that directory.

Học lập trình trực tuyến cho phụ nữ

7. cp – Copy

cp <source file> <file destination> copy the file from the source location to the destination location.
You can also use cp -r <source directory> <target directory> to copy the directory and all internal data.

Học lập trình trực tuyến cho người lớn tuổi

8. mv – Move

mv <source> <target> move a file or folder from one location to another. This command is also used to rename files or folders if <source> and <target> are the same folder.

Học lập trình trực tuyến cho người mất gốc

9. cat – concatenate and print files

cat <file name> read and print the contents of the file to the screen.

Học lập trình trực tuyến cho mọi đối tượng

10. tail – print TAIL

tail <file name> read and print the last 10 lines of the file (default).
You can use tail -n N <file name> to specify the N lines to print to the screen.

Học lập trình online

11. less – print LESS

less <file name> prints the contents of a file by page in case the file content is too large and must be read by the page. You can use Ctrl + F to move the next page and Ctrl + B to move to the previous page.

Học lập trình online cấp tốc

12. grep

grep <string> <file name> searches the content of the file according to the supply chain.
You can use grep -i <string> <filename> to search for non-case sensitive or grep -r <string> <directory name> to search the entire directory

Học lập trình online chất lượng nhất

13. find

find <> directory -name <file name> search file in <directory> under <file name> .
You can also use find <directory> -iname <filename> to search regardless of regular flowers.

Học lập trình online cho thanh niên

14. tar

tar -cvf <name-file-compress.tar> <file1 or file2 …> create compressed file (.tar) from the available files.

tar -tvf <name-file-compressed.tar> see the compressed file content (.tar).

tar -xvf <name-file- compressed.tar > extract (.tar file).

Học lập trình online xin việc làm

15. gzip

gzip <file name> create compressed file (.gz). Use gzip -d <file name> to extract (.gz file).

Học lập trình online hiệu quả

16. unzip

unzip <file-zipped.zip> unzip a compressed file (.zip). Use unzip -l <file-compressed.zip> to view zip file contents without extracting.

Học lập trình online cho người đi làm

17. help

<> -help statement see the help information and command options.
Can be abbreviated as <statement> -h

Học lập trình trực tuyến

18. whatis – What is this command

whatis <command name> shows a description of the command.

Học lập trình online

19. man – Manual

man <command name> displays the instruction page for the command.

Học lập trình trực tuyến hiệu quả

20. exit

exit exit the session. Similar to exiting an application on the user interface.

Học lập trình trực tuyến hiệu quả chất lượng

21. ping

ping <host> address to ping a remote host (server) by sending packets to that host. It is often used to check the network connection to the server.

Học lập trình online xin việc làm

22. who – Who Is logged in

who displays the list of accounts logged into the system.

Học lập trình trực tuyến dễ xin việc làm

23. su – Switch User

su <account name> switch to login with another account. The root account can switch to login with other accounts without entering a password.

Học lập trình online cấp tốc

24. uname

uname shows some system information such as kernel name, host name, processor, …
You can use the uname -a command to display all information.

Học lập trình online cho người mất gốc

25. free – Free memory

free view memory information: used memory, free memory on the system
You can use the free -m command to see the memory with KBs units or free -g to view with GBs

Học lập trình trực tuyến cho người mất căn bản

26. df – Disk space Free

df view information about hard disk capacity (used, available, …) and other storage devices.
You can use the df -h command to view information in human readable form (displayed in KBs units, GBs for readability).

Học lập trình online cho người đi làm

27. ps – Processes

ps displays information about running processes.

Học lập trình trực tuyến cho người lớn tuổi

28. top – Top processes

The top displays information about running processes, sorted by CPU performance.
You can also use the top -u command <account> to view the running process information for that account.

Học lập trình trực tuyến cho thanh niên

29. shutdown

shutdown command to turn off the computer. You can use shutdown -r to restart the computer.

ITZone via Techmaster

Share the news now