Common Linux commands:
General user commands:
I. File and directory view class commands
1. LS (Common Parameters-L and-H)
Blue color: Indicates directory
Green color: Represents an executable file
Red color: Indicates compressed file
White color: Indicates normal file
Cyan: Indicates a linked file
Ls-l: Displays all files and folders under the current folder using a list
Lists primarily include the file's permission bits and file owners
Ls-l-H
Normally the-l parameter needs to be used with the-H parameter (when the file size is displayed using K or M)
2.cat command (for displaying file contents)
3.PWD command: (for displaying the current path)
ii. file and Directory management class commands
1.chmod Command (to modify the file's permission bit)
Description of the file's permissions:
The start bit represents a file attribute: (d: Represents a directory;-represents a normal file)
Next every three characters in a group (a total of three groups): (r: Indicates Read permission) W: Indicates write (writable permission) x: Indicates executable permission)
Note: For normal file x means executable, for directory x means you can use LS to view the contents of the directory
First Group: User rights
Second group: Permissions for the group in which the user resides
Group Three: Permissions for other users
To add writable permissions to a user group:
View:
Subtract user group permissions:
View changes to:
2.CHGRP command: (for modifying the owner of a file, including the file owner and the group in which the owner resides)
three. System Information view class commands (view system-related information)
1.who (used to see which users are currently logged on to the system)
2.date command (for output current time)
3.ps command: (for displaying the current process)
PS Default only shows the processes created by the current user
Show system all processes use PS-E to list all processes in the system
PID: Process ID Number
TTY: Indicates which terminal the process is working on
Time: When the process was created
CMD: Which program created the process
4.kill command: (used to kill a process)
Kill 3494 Processes
Have killed
5.uname command (for displaying machine names)
UNAME-A (Display system Information complete parameters)
Super User command: (Superuser can use all commands of normal user)
1.ifconfig Command (for NIC configuration)
Shows the configuration of the current machine card without any parameters
ETH: Linux is a naming convention for network cards, and Eth0 represents the first NIC
Lo: is a return device, which is a kernel virtual appliance
Add an IP address, plus a subnet mask
2.fdisk command (for disk partitioning) (use sparingly)
Fdisk-l Viewing partitions
3.modprobe (Load OS kernel module or driver)
4.lsmod (view system kernel module)
The kernel modules that the kernel has loaded are listed below
Module: Modules Name
Size: Sizes
Used by: Which other modules are used by this module
Several Linux commands