Терминал Linux, также известный как командная строка или оболочка, представляет собой текстовый интерфейс, который позволяет пользователям взаимодействовать с операционной системой с помощью команд. Он обеспечивает мощный и эффективный способ выполнения различных задач и управления системой.

ПРИМЕРЫ ДЛЯ КАЖДОЙ КОМАНДЫ ПРОВЕРЬТЕ ИСТОРИИ:

https://kkcom.medium.com/learn-linux-terminal-linux-shell-from-zero-to-hero-the-complete-beginner-linux-guide-for-e99874c34c50

ФАЙЛ КОМАНДЫ

$ ls                  #===> Directory listing
$ ls -al              #===> Formatted listing with hidden files
$ ls -lt              #===> Sorting the Formatted listing by time modification
$ cd dir              #===> Change directory to dir
$ cd                  #===> Change to home directory
$ pwd                 #===> Show current working directory
$ mkdir dir           #===> Creating a directory dir
$ cat >file           #===> Places the standard input into the file
$ more file           #===> Output the contents of the file
$ head file           #===> Output the first 10 lines of the file
$ tail file           #===> Output the last 10 lines of the file
$ tail -f file        #===> Output the contents of file as it grows, starting with the last 10 lines
$ touch file          #===> Create or update file
$ rm file             #===> Deleting the file
$ rm -r dir           #===> Deleting the directory
$ rm -f file          #===> Force to remove the file
$ rm -rf dir          #===> Force to remove the directory dir
$ cp file1 file2      #===> Copy the contents of file1 to file2
$ cp -r dir1 dir2     #===> Copy dir1 to dir2;create dir2 if not present
$ tar                 #===> Zip/unzip a file 

КОМАНДЫ УПРАВЛЕНИЯ ПРОЦЕССОМ

$ ps                #===> Display the currently working processes
$ top               #===> Display all running process
$ pkill pattern     #===> Kill all processes matching the pattern
$ bg                #===> List stopped/background jobs, resume a stopped job in the background
$ fg                #===> Bring the most recent job to foreground
$ fg n              #===> Bring job n to the foreground

ПОИСК КОМАНД

$ grep pattern file       #===> Search for pattern in file
$ grep -r pattern dir     #===> Search recursively for pattern in dir
$ command | grep pattern  #===> Search pattern in the output of a command
$ locate file_name        #===> Find all instances of file_name
$ find . -name filename   #===> Search in the current directory and below it, for files
                                # and directories with names starting with filename
$ pgrep pattern           #===> Search all named processes that match with the pattern and return their ID

СИСТЕМНЫЕ ИНФОРМАЦИОННЫЕ КОМАНДЫ

$ date                    #===> Show current date and time
$ cal                     #===> Show this month's calender
$ uptime                  #===> Show current uptime
$ w                       #===> Display who is online
$ whoami                  #===> Who you are logged in as
$ finger user             #===> Display information about the user
$ uname -a                #===> Show kernel information
$ cat /proc/cpuinfo       #===> CPU information
$ cat proc/meminfo        #===> Memory information
$ man command             #===> Show the manual for the 'command' command
$ df                      #===> Show the disk usage    
$ du                      #===> Show directory space usage
$ free                    #===> Show memory and swap usage
$ whereis app             #===> Show possible locations of app
$ which app               #===> Show which application will run by default

СЕТЬ

$ ping host               #===> Ping host and output results
$ whois domain            #===> Get whois information for domains
$ dig domain              #===> Get DNS information for domain
$ dig -x host             #===> Reverse lookup host
$ wget file               #===> Download file
$ wget -c file            #===> Continue a stopped download

ЯРЛЫКИ

$ ctrl+c                  #===> Halts the current command
$ ctrl+z                  #===> Stops the current command, resume with "fg" in the foreground or "bg" in the background
$ ctrl+d                  #===> Logout the current session, similar to exit
$ ctrl+w                  #===> Erase one word in the current line
$ ctrl+u                  #===> Erase the whole line
$ ctrl+r                  #===> Type to bring up a recent command
$ !!                      #===> Repeat the last command
$ exit                    #===> Logout the current session

ИСТОРИЯ ОБНОВЛЯЕТСЯ…