Table of Contents
mtr command
nl command
ss command
last command
tree command
命令
stat command
pv command
curl command
file command
id command
at command
du command
expr command
look command
yes command
factor command
ping command
tac command
strace command
disown command
getconf command
while command
convert command
watch command
host and dig commands
dstat command
bind command
touch command
lsb_release command
nc command
find command
apt command
lsof command
pdftk command
Home System Tutorial LINUX 51 Lesser-Known Linux Commands for Power Users

51 Lesser-Known Linux Commands for Power Users

May 12, 2025 am 09:51 AM

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>
Copy after login
  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>
Copy after login
  1. mtr command

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

 <code>mtr google.com</code>
Copy after login
  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>
Copy after login
  1. shuf command

Randomly select lines or shuffle content in the file.

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

Shows socket statistics and active connections.

 <code>ss -tuln</code>
Copy after login
  1. <code>last</code> command

Displays the history of the last logged in user.

 <code>last</code>
Copy after login
  1. <code>curl ifconfig.me</code>

Displays the external IP address of the machine.

 <code>curl ifconfig.me</code>
Copy after login
  1. <code>tree</code> command

Display files and directories in a tree structure.

 <code>tree</code>
Copy after login
  1. <code>pstree</code>

Displays a hierarchical view of the running process.

 <code>pstree</code>
Copy after login
  1. <space>命令<space></space></space>

Prevent commands from being saved to history.

<code><space> ls<space></space></space></code>
Copy after login
  1. stat command

Displays detailed status information of the file or file system.

 <code>stat file.txt</code>
Copy after login
  1. <alt>.</alt> <esc>.</esc>

Reuse the last parameter of the previous command.

 <code>echo foo<alt> .</alt></code>
Copy after login
  1. pv command

Simulate Hollywood style text stream.

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

Displays mounted file systems in a well-formatted manner.

 <code>mount | column -t</code>
Copy after login
  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> (.*)/'
Copy after login
  1. screen command

Separate and reconnect long-running processes from the terminal.

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

Identify the type of file.

 <code>file file.txt</code>
Copy after login
  1. <code>id</code> command

Print user and group ID information.

 <code>id</code>
Copy after login
  1. ^foo^bar

Replace foo from the previous command with bar .

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

Refresh the contents of the file from the command prompt.

 <code>> file.txt</code>
Copy after login
  1. at command

Schedule the command to run later.

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

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

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

Solve simple mathematical calculations in the terminal.

 <code>expr 3 5</code>
Copy after login
  1. look command

Check the words in the dictionary.

 <code>look apple</code>
Copy after login
  1. yes command

Repeat output string until interrupted.

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

Shows all factors of the given number.

 <code>factor 12</code>
Copy after login
  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>
Copy after login
  1. tac command

Output the contents of the file in reverse order.

 <code>tac file.txt</code>
Copy after login
  1. strace command

Debugging tool for tracking system calls.

 <code>strace ls</code>
Copy after login
  1. disown command

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

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

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

 <code>getconf LONG_BIT</code>
Copy after login
  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>
Copy after login
  1. convert command

Converts the output of the command to an image.

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

Display animated digital clock in the terminal.

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

DNS lookup utility.

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

Generate real-time system resource statistics.

 <code>dstat</code>
Copy after login
  1. bind command

Shows all Bash key bindings.

 <code>bind -p</code>
Copy after login
  1. touch command

Force file system checks on the next restart.

 <code>sudo touch /forcefsck</code>
Copy after login
  1. lsb_release command

Print Linux distribution information.

 <code>lsb_release -a</code>
Copy after login
  1. nc command

Check if a specific port is open.

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

Output geographic information about the IP address.

 <code>curl ipinfo.io</code>
Copy after login
  1. find command

List all files owned by user xyz.

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

Install all build dependencies for the package.

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

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

 <code>lsof -iTCP:80 -sTCP:LISTEN</code>
Copy after login
  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>
Copy after login
  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>
Copy after login
  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>
Copy after login
  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>
Copy after login

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 of this Website
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

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

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1666
14
PHP Tutorial
1273
29
C# Tutorial
1252
24
Does the internet run on Linux? Does the internet run on Linux? Apr 14, 2025 am 12:03 AM

The Internet does not rely on a single operating system, but Linux plays an important role in it. Linux is widely used in servers and network devices and is popular for its stability, security and scalability.

What are Linux operations? What are Linux operations? Apr 13, 2025 am 12:20 AM

The core of the Linux operating system is its command line interface, which can perform various operations through the command line. 1. File and directory operations use ls, cd, mkdir, rm and other commands to manage files and directories. 2. User and permission management ensures system security and resource allocation through useradd, passwd, chmod and other commands. 3. Process management uses ps, kill and other commands to monitor and control system processes. 4. Network operations include ping, ifconfig, ssh and other commands to configure and manage network connections. 5. System monitoring and maintenance use commands such as top, df, du to understand the system's operating status and resource usage.

What is the salary of Linux administrator? What is the salary of Linux administrator? Apr 17, 2025 am 12:24 AM

The average annual salary of Linux administrators is $75,000 to $95,000 in the United States and €40,000 to €60,000 in Europe. To increase salary, you can: 1. Continuously learn new technologies, such as cloud computing and container technology; 2. Accumulate project experience and establish Portfolio; 3. Establish a professional network and expand your network.

What are the main tasks of a Linux system administrator? What are the main tasks of a Linux system administrator? Apr 19, 2025 am 12:23 AM

The main tasks of Linux system administrators include system monitoring and performance tuning, user management, software package management, security management and backup, troubleshooting and resolution, performance optimization and best practices. 1. Use top, htop and other tools to monitor system performance and tune it. 2. Manage user accounts and permissions through useradd commands and other commands. 3. Use apt and yum to manage software packages to ensure system updates and security. 4. Configure a firewall, monitor logs, and perform data backup to ensure system security. 5. Troubleshoot and resolve through log analysis and tool use. 6. Optimize kernel parameters and application configuration, and follow best practices to improve system performance and stability.

Boost Productivity with Custom Command Shortcuts Using Linux Aliases Boost Productivity with Custom Command Shortcuts Using Linux Aliases Apr 12, 2025 am 11:43 AM

Introduction Linux is a powerful operating system favored by developers, system administrators, and power users due to its flexibility and efficiency. However, frequently using long and complex commands can be tedious and er

What is the main purpose of Linux? What is the main purpose of Linux? Apr 16, 2025 am 12:19 AM

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

What is Linux actually good for? What is Linux actually good for? Apr 12, 2025 am 12:20 AM

Linux is suitable for servers, development environments, and embedded systems. 1. As a server operating system, Linux is stable and efficient, and is often used to deploy high-concurrency applications. 2. As a development environment, Linux provides efficient command line tools and package management systems to improve development efficiency. 3. In embedded systems, Linux is lightweight and customizable, suitable for environments with limited resources.

What are the differences in virtualization support between Linux and Windows? What are the differences in virtualization support between Linux and Windows? Apr 22, 2025 pm 06:09 PM

The main differences between Linux and Windows in virtualization support are: 1) Linux provides KVM and Xen, with outstanding performance and flexibility, suitable for high customization environments; 2) Windows supports virtualization through Hyper-V, with a friendly interface, and is closely integrated with the Microsoft ecosystem, suitable for enterprises that rely on Microsoft software.

See all articles