search
HomeSystem TutorialLINUX51 Lesser-Known Linux Commands for Power Users

51 Lesser-Known Linux Commands for Power Users

Linux is known for its powerful set of command-line tools that allow users to interact with the system efficiently. While many Linux users are familiar with common commands such as ls , cd , or grep , there are also few lesser-known but extremely useful commands and shortcuts that can simplify and increase productivity.

We are excited to share our latest five articles on " less known Linux commands " with over 50 commands you may not know about.

This article integrates these five articles into a simple guide, briefly summarizing the functions and examples of each command.
  1. sudo !!

If you forget to run the command with sudo , you don't need to rewrite the entire command. Just type sudo !! and it will execute the last command using sudo .

 <code>apt update权限被拒绝**sudo !!** sudo apt update</code>
  1. python -m SimpleHTTPServer

Create a simple web page for the current working directory on port 8000.

 <code>python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 ...</code>
  1. mtr command

Combining ping and traceroute, display network status in real time.

 <code>mtr google.com</code>
  1. Ctrl xe

Opens the terminal's default text editor, allowing you to edit the current command before running.

For example, press Ctrl x in the terminal and then e to open the command in the editor.

  1. nl command

Output text file content with line number.

 <code>nl file.txt 1 这是第一行2 这是第二行</code>
  1. shuf command

Randomly select lines or shuffle content in the file.

 <code>shuf -n 3 file.txt</code>
  1. ss command

Shows socket statistics and active connections.

 <code>ss -tuln</code>
  1. <code>last</code> command

Displays the history of the last logged in user.

 <code>last</code>
  1. <code>curl ifconfig.me</code>

Displays the external IP address of the machine.

 <code>curl ifconfig.me</code>
  1. <code>tree</code> command

Display files and directories in a tree structure.

 <code>tree</code>
  1. <code>pstree</code>

Displays a hierarchical view of the running process.

 <code>pstree</code>
  1. <space>命令<space></space></space>

Prevent commands from being saved to history.

<code><space> ls<space></space></space></code>
  1. stat command

Displays detailed status information of the file or file system.

 <code>stat file.txt</code>
  1. <alt>.</alt> <esc>.</esc>

Reuse the last parameter of the previous command.

 <code>echo foo<alt> .</alt></code>
  1. pv command

Simulate Hollywood style text stream.

 <code>echo "正在加载..." | pv -qL 10</code>
  1. <code>mount | column -t</code>

Displays mounted file systems in a well-formatted manner.

 <code>mount | column -t</code>
  1. Ctrl l

Clear the terminal screen immediately by pressing Ctrl l in the terminal.

  1. curl command

Get unread Gmail messages in the terminal.

 <code>curl -u username --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "$1\n" if /</code> (.*)/'
  1. screen command

Separate and reconnect long-running processes from the terminal.

 <code>screen -S session_name</code>
  1. file command

Identify the type of file.

 <code>file file.txt</code>
  1. <code>id</code> command

Print user and group ID information.

 <code>id</code>
  1. ^foo^bar

Replace foo from the previous command with bar .

 <code>echo foo ^foo^bar</code>
  1. <code>> file.txt</code>

Refresh the contents of the file from the command prompt.

 <code>> file.txt</code>
  1. at command

Schedule the command to run later.

 <code>echo "shutdown now" | at 23:00</code>
  1. du command

Displays the size of files and folders in the current directory.

 <code>du -h --max-depth=1</code>
  1. expr command

Solve simple mathematical calculations in the terminal.

 <code>expr 3 5</code>
  1. look command

Check the words in the dictionary.

 <code>look apple</code>
  1. yes command

Repeat output string until interrupted.

 <code>yes "我将学习Linux!"</code>
  1. factor command

Shows all factors of the given number.

 <code>factor 12</code>
  1. ping command

When the host is online, use sound feedback to ping the host.

 <code>ping -i 60 -a 8.8.8.8</code>
  1. tac command

Output the contents of the file in reverse order.

 <code>tac file.txt</code>
  1. strace command

Debugging tool for tracking system calls.

 <code>strace ls</code>
  1. disown command

Run commands in the background even after the terminal is closed.

 <code>sleep 1000 & disown -a && exit</code>
  1. getconf command

Displays the system architecture (32-bit or 64-bit).

 <code>getconf LONG_BIT</code>
  1. while command

Display the date and time in the upper right corner of the terminal.

 <code>while sleep 1; do tput sc; tput cup 0 $(($(tput cols)-29)); date; tput rc; done &</code>
  1. convert command

Converts the output of the command to an image.

 <code>convert input.jpg output.png</code>
  1. watch command

Display animated digital clock in the terminal.

 <code>watch -t -n1 "date %T|figlet"</code>
  1. host and dig commands

DNS lookup utility.

 <code>host google.com dig google.com</code>
  1. <code>dstat</code> command

Generate real-time system resource statistics.

 <code>dstat</code>
  1. bind command

Shows all Bash key bindings.

 <code>bind -p</code>
  1. touch command

Force file system checks on the next restart.

 <code>sudo touch /forcefsck</code>
  1. lsb_release command

Print Linux distribution information.

 <code>lsb_release -a</code>
  1. nc command

Check if a specific port is open.

 <code>nc -zv localhost 22</code>
  1. <code>curl ipinfo.io</code>

Output geographic information about the IP address.

 <code>curl ipinfo.io</code>
  1. find command

List all files owned by user xyz.

 <code>find . -user xyz</code>
  1. apt command

Install all build dependencies for the package.

 <code>sudo apt build-dep vim</code>
  1. lsof command

This command lists all services or processes currently listening on TCP port 80.

 <code>lsof -iTCP:80 -sTCP:LISTEN</code>
  1. find -size 100M

This command searches all files and folders in the current directory and its subdirectories that are larger than 100 megabytes.

 <code>find . -size 100M</code>
  1. pdftk command

pdftk is a powerful command line tool that allows you to manipulate PDF files, including merging multiple PDF files into one.

 <code>pdftk file1.pdf file2.pdf cat output combined.pdf</code>
  1. ps -LF -u user_name

This command displays all processes and threads for the specified user, including detailed information about the status of each thread.

 <code>ps -LF -u john</code>
  1. <code>startx -- :1</code>

This command starts a new X session on display :1 , which is useful for running multiple graphical user interfaces simultaneously on different screens.

 <code>startx -- :1</code>

That's all for the time being! Don't forget to share your thoughts in the comment section. This is not the end of the little-known Linux commands; we will continue to bring you more in the following articles.

I will soon return to our readers with another interesting and useful article. Until then, please continue to follow Tecmint.com!

The above is the detailed content of 51 Lesser-Known Linux Commands for Power Users. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How to Manage Firewalld and UFW for Linux SecurityHow to Manage Firewalld and UFW for Linux SecurityMay 12, 2025 am 10:56 AM

Linux systems rely on firewalls to safeguard against unauthorized network access. These software barriers control network traffic, permitting or blocking data packets based on predefined rules. Operating primarily at the network layer, they manage

How to Check If Your Linux System is a Desktop or LaptopHow to Check If Your Linux System is a Desktop or LaptopMay 12, 2025 am 10:48 AM

Determining if your Linux system is a desktop or laptop is crucial for system optimization. This guide outlines simple commands to identify your system type. The hostnamectl Command: This command provides a concise way to check your system's chassis

How to Increase TCP/IP Connections in LinuxHow to Increase TCP/IP Connections in LinuxMay 12, 2025 am 10:23 AM

Guide to adjust the number of TCP/IP connections for Linux servers Linux systems are often used in servers and network applications. Administrators often encounter the problem that the number of TCP/IP connections reaches the upper limit, resulting in user connection errors. This article will guide you how to improve the maximum number of TCP/IP connections in Linux systems. Understanding TCP/IP connection number TCP/IP (Transmission Control Protocol/Internet Protocol) is the basic communication protocol of the Internet. Each TCP connection requires system resources. When there are too many active connections, the system may reject new connections or slow down. By increasing the maximum number of connections allowed, server performance can be improved and more concurrent users can be handled. Check the current number of Linux connections limits Change settings

How to Convert SVG to PNG in Linux TerminalHow to Convert SVG to PNG in Linux TerminalMay 12, 2025 am 10:21 AM

SVG (Scalable Vector Graphics) files are ideal for logos and illustrations due to their resizability without quality loss. However, PNG (Portable Network Graphics) format often offers better compatibility with websites and applications. This guide d

How to Create Your Own Android and iOS Apps with LiveCodeHow to Create Your Own Android and iOS Apps with LiveCodeMay 12, 2025 am 10:10 AM

LiveCode: A Cross-Platform Development Revolution LiveCode, a programming language debuting in 1993, simplifies app development for everyone. Its high-level, English-like syntax and dynamic typing enable the creation of robust applications with ease

How to Reset a USB Device from the Linux TerminalHow to Reset a USB Device from the Linux TerminalMay 12, 2025 am 10:07 AM

This guide provides a step-by-step process for resetting a malfunctioning USB device via the Linux command line. Troubleshooting unresponsive or disconnected USB drives is simplified using these commands. Step 1: Identifying Your USB Device First, i

How to Set a Temporary Static IP Address on LinuxHow to Set a Temporary Static IP Address on LinuxMay 12, 2025 am 10:06 AM

Temporarily setting a static IP address on Linux is invaluable for network troubleshooting or specific session configurations. This guide details how to achieve this using command-line tools, noting that the changes are not persistent across reboots

51 Lesser-Known Linux Commands for Power Users51 Lesser-Known Linux Commands for Power UsersMay 12, 2025 am 09:51 AM

Linux is known for its powerful set of command-line tools that allow users to interact with the system efficiently. While many Linux users are familiar with common commands such as ls, cd, or grep, there are also few lesser-known but extremely useful commands and shortcuts that can simplify and increase productivity. We are excited to share our latest five articles on "less known Linux commands" with over 50 commands you may not know about. You may also like: 11 little-known practical Linux commands – Part 1 10 little-known Linux commands – Part 2 10 little-known Linux commands – Part 3 10 little-known valid Linux commands

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool