ЗАКАЗorder-icon

Список команд Linux

Основной способ управления Linux без графического интерфейса - командная строка. Список команд linux приведен ниже.

Общие

[+]
clear
clear the screen.
--help
справка о команде
показать[+]
ps --help
man
is used to show the manual of the inputted command.
показать[+]
man cd
grep
which stands for "global regular expression print," processes text line by line and prints any lines which match a specified pattern.
показать[+]
ps -A | grep sd
>
takes the standard output of the command on the left, and redirects it to the file on the right.
показать[+]
cat oceans.txt > continents.txt

Файлы и папки

[+]
cp
copy files and directories.
показать[+]
cd /usr/share
pwd
command will allow you to know in which directory you're located
cd
change directory - will allow the user to change between file directories.
показать[+]
cd /usr/share
ls
Lists the contents of a directory.
Blue: Directory
Green: Executable or recognized data file
Sky Blue: Symbolic link file
Yellow with black background: Device
Pink: Graphic image file
Red: Archive file
Red with black background: Broken link
показать[+]
ls /etc
mv
move - allows a user to move a file to another folder or directory.
показать[+]
mv/arora/applications/majorapps /arora/applications/minorapps
mkdir
make directory - command allows the user to make a new directory.
показать[+]
mkdir testdirectory
rmdir
remove directory - command allows the user to remove an existing command using the Linux CLI.
показать[+]
rmdir testdirectory
rm
remove - like the rmdir command is meant to remove files from your Linux OS.
показать[+]
rm testfile.txt
nano
is a command line text editor. It works just like a desktop text editor like TextEdit or Notepad, except that it is accessible from the the command line and only accepts keyboard input.
показать[+]
nano hello.txt

Диски, файловые системы, разделы дисков

[+]
df
displays filesystem disk space usage for all mounted partitions.
-hHuman Readable
показать[+]
df -h
du
displays the disk usage for a directory.
показать[+]
du /media/floppy

Время, временные зоны, переменные окружения

[+]
env
The env command stands for "environment", and returns a list of the environment variables for the current user.
timedatectl
may be used to query and change the system clock and its settings.
показать[+]
--
-
-
zdump
time zone dumper.
показать[+]
zdump /etc/localtime
zdump /usr/share/zoneinfo/*
-

Процессы и службы

[+]
ps
This command produces a list of the currently running processes on your computer.
-e, -A To view all the running processes use either of the following commands/
-efYou can get a full listing by running the following command.
-less
-more
показать[+]
ps -e --format="uid uname cmd time"
ps -ef | grep chrome
service
starts or stops a service by running an initialization script. The service command references a service by using its init script, which is stored in the /etc/init.d directory.
показать[+]
service --status-allTo view all the running processes use either of the following commands/
service --status-all | more
service --status-all | grep ntpd
service sshd status
service sshd restart
ping
echo request - response basic on ICMP-protocol.
-a Audible ping
ping -4 ip v4
ping -6 ip v6
ping -c 4 limit the number of attempts
ping -w 10 This sets a deadline for the ping to last for 10 seconds
sudo ping -f floods the number of requests to the receiving network.
ping -i 4 to specify a longer interval between each request.
man ping manual
показать[+]
ls /etc

Интерфейсы и протоколы

[+]
ifconfig
Аналог IPconfig Windows, с другими ключевыми параметрами и более широким функционалом.
netstat
Отображение статистики протокола и текущих сетевых подключений
route
Просмотр и изменение таблиц маршрутизации
route -n
iptables
Настройка межсетевого экрана
route -n

Конфигурация системы и железа

[+]
lscpu
Linux cpu/hardware information
free
Linux show free and used memory in the system
показать[+]
free
free -m
free -mt free -gt
uname
current running kernel version
-mrs
-a
показать[+]
uname -mrs
uname -a
lspci
List all PCI devices
lsusb
List all USB devices
lsblk
List all block devices (hard disks, cdrom, and others)
top
'table of processes') command displays information on your Linux system, running processes and system resources, including CPU, RAM & swap usage and total number of tasks being run. To exit top, press "q".

Пользователи и группы

[+]
adduser
command will create a new general user called "newuser" on your system
показать[+]
adduser newuser
passwd
to assign a password for the newuser account use
показать[+]
passwd newuser