Essential Linux Commands



???????? ?????? ?????????????????? ????????????????????

? ls: Lists the contents of the current directory.

? pwd: Prints the full path of the current working directory.

? cd: Changes the current working directory.

? mkdir: Creates a new directory.

? rmdir: Removes an empty directory.

? touch: Creates a new empty file.

? cp: Copies files or directories.

? mv: Moves or renames files or directories.

? rm: Removes files or directories.


?????????????? ????????????????????

? ps: Lists currently running processes.

? top: Dynamically displays active processes in real-time.

? htop: An interactive process viewer offering more detailed information.

? kill: Terminates a specified process.

? killall: Terminates all instances of a process by name.

? pgrep: Searches for processes by name and prints their PIDs.

? pkill: Terminates processes by name or other criteria.



???????? ?????? ?????????? ????????????????????

? passwd: Changes a user's password.

? useradd: Adds a new user to the system.

? userdel: Removes a user from the system.

? groups: Displays the groups a user belongs to.

? usermod: Modifies user account properties.

? id: Displays user and group ID information.

? groupadd: Creates a new group.

? groupdel: Deletes a group.


???????????? ??????????????????????

? uname: Displays basic system information, such as the operating system name and kernel version.

? df: Reports disk space usage of file systems.

? du: Estimates file and directory space usage.

? free: Displays memory usage information.

? lscpu: Displays CPU architecture information.

? lshw: Lists detailed hardware information

.? lsblk: Lists information about block devices.


?????????????? ?????????????????????????? ?????? ????????????????????

? ifconfig: Displays and configures network interfaces.

? ip: Shows and manipulates routing, devices, policy routing, and tunnels.

? ping: Tests the reachability of a network host.

? netstat: Displays network connections, routing tables, and interface statistics.

? ss: Another utility for investigating sockets.

? traceroute: Displays the route and transit delays of packets.

? ssh: Securely logs into remote machines.

? nc: A versatile tool for network communication, often dubbed the "Swiss army knife" for TCP/IP.


P???????????? ????????????????????

? apt-get, apt: Package management tools for Debian-based systems.

? yum, dnf: Package management tools for RPM-based systems.

? rpm: Package manager for RPM packages (Red Hat Package Manager).

? dpkg: Package manager for Debian packages.

? snap: Universal Linux package system.

? zypper: Package manager for openSUSE.


???????? ?????????????? ?????? ??????????????

? cat: Displays the contents of a file.

? less: Views the contents of a file with navigation capabilities.

? more: Another file viewer with basic navigation.

? vim: A powerful text editor with extensive features.

? nano: A simple and user-friendly text editor for the terminal.

要查看或添加评论,请登录

Susheel Kumar的更多文章

社区洞察

其他会员也浏览了