亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Table of Contents
1. ls Command
2. lsblk Command
4. dd Command
6. history Command
7. sudo Command
8. mkdir Command
9. touch Command
Home System Tutorial LINUX 20 Must-Know Terminal Commands for New Linux Users

20 Must-Know Terminal Commands for New Linux Users

May 28, 2025 am 10:01 AM

Sure! Here's the revised version of your text with the requested modifications:


So, are you considering switching from Windows to Linux or have you recently transitioned to Linux? Hmm, what am I asking? Why else would you be here?

[ You might also like: How I Made the Shift from Windows to Linux Mint ]In my initial experiences as a beginner, Linux commands and terminals seemed quite daunting. I had concerns about the commands and wondered how much I needed to recall and memorize to become adept and fully operational with Linux.

Without a doubt, online resources, Linux books, man pages, and the user community offered considerable help.

However, I firmly believe there should be an article featuring basic Linux commands in a simple-to-learn and understand manner.

These inspirations drove me to master Linux and make it more accessible. This piece is a step toward that objective.”

1. ls Command

The command ‘ls‘ stands for ‘List Directory Contents‘, which is used to show the contents of the folder, whether they are files or subfolders, from which the command is executed.

<code>ls</code>

The ‘ls -l‘ command lists the contents of the folder in a detailed, long listing format.

<code>ls -l</code>

The ‘ls -a‘ command lists the contents of a folder, including hidden files that begin with '.'.

<code>ls -a</code>

In Linux, a file name beginning with '.' is regarded as hidden. In Linux, every file, folder, device, or command is treated as a file.

20 Must-Know Terminal Commands for New Linux Users

The result of the ls -l command is:

  • File Type – The first character indicates the file type ('-' for a regular file, 'd' for a directory, 'l' for a symbolic link, etc.).
  • Permissions – The next nine characters denote the file’s permissions for the owner, group, and others. These characters can include 'r' for read, 'w' for write, and 'x' for execute permissions.
  • Number of Links – Indicates the number of hard links pointing to the file or directory.
  • Owner and Group – Specifies the user (owner) and group associated with the file or directory.
  • File Size – Shows the size of the file in bytes.
  • Modification Time – Displays the date and time when the file or directory was last modified.
  • File or Directory Name – The actual name of the file or directory.

For more “ls” command examples read our series of articles:

You might also like:

  • 15 Basic ls Command Examples in Linux
  • 7 Quirky ‘ls’ Command Tricks Every Linux User Should Know
  • How to Sort Output of ‘ls’ Command By Last Modified Date and Time
  • How to List All Files Ordered by Size in Linux

2. lsblk Command

The ‘lsblk‘ command, short for ‘List Block Devices,’ displays block devices by their assigned names (excluding RAM) in a tree-like format on the standard output.

<code>lsblk</code>

The ‘lsblk -l‘ command lists block devices in a ‘list‘ structure instead of a tree-like fashion.

<code>lsblk -l</code>

20 Must-Know Terminal Commands for New Linux Users

lsblk is a very handy and straightforward way to identify the name of the new USB device you've just plugged in, especially when dealing with disks or blocks in the terminal.

[ You might also like: 10 Commands to Find Linux Hardware Information ]### 3. md5sum Command

The ‘md5sum‘ stands for ‘Compute and Check MD5 Message-Digest‘. MD5 checksum (commonly referred to as a ‘hash‘) is used to match or verify the integrity of files that may have changed due to a faulty file transfer, disk error, or non-malicious interference.

<code>md5sum teamviewer_linux.deb 
<p>47790ed345a7b7970fc1f2ac50c97002  teamviewer_linux.deb</p></code>

The user can compare the generated md5sum with the one provided officially. MD5sum is considered less secure than sha1sum, which we will discuss later.

4. dd Command

The dd command stands for ‘Convert and Copy a file‘ and can be used to convert and copy a file. Most often, it is used to copy an ISO file (or any other file) to a USB device (or another location), making it suitable for creating a bootable USB stick.

<code>dd if=debian.iso of=/dev/sdb1 bs=512M; sync</code>

Note: In the above example the USB device is supposed to be sdb1 (You should verify it using the command lsblk, otherwise you will overwrite your disk and OS), use the name of the disk very cautiously! The dd command takes some time ranging from a few seconds to several minutes in execution, depending on the size and type of file and read and write speed of the USB stick.

[ You might also like: How to Clone a Partition Using dd Command ]### 5. uname Command

The uname command stands for (Unix Name), and prints detailed information about the machine name, operating system, and kernel version.

<code>uname -a<p>Linux TecMint 6.2.0-39-generic #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC 
Thu Nov 16 10:53:04 UTC  x86_64 x86_64 x86_64 GNU/Linux</p></code>

The result of the uname -a command is:

  • Linux“: The machine’s kernel name.
  • tecmint“: The machine’s node name.
  • 6.2.0-39-generic“: The kernel release.
  • 22.04.1-Ubuntu SMP“: The operating system release version.
  • x86_64“: The architecture of the processor.
  • GNU/Linux“: The operating system name.

6. history Command

The history command stands for History (Event) Record, it prints the history of a long list of executed commands in the terminal.

<code>history</code>

20 Must-Know Terminal Commands for New Linux Users

Note: Pressing 'Ctrl R' allows you to search for previously executed commands, enabling your command to be completed using the auto-completion feature.

<code>(reverse-i-search)`if': ifconfig</code>

For more examples of history commands, please refer to our series of articles:

You might also like:

  • How to Run a Command Without Saving It in History
  • How to Clear BASH Command Line History in Linux
  • How to Set Date and Time for Command in History

7. sudo Command

The “sudo” (superuser do) command allows a permitted user to execute a command as the superuser or another user, as specified by the security policy in the sudoers list.

<code>sudo apt update</code>

Note: sudo allows users to borrow superuser privileges, while a similar command ‘su‘ allows users to log in as superusers. Sudo is safer than su.

It is not advised to use sudo or su for day-to-day normal use, as it can result in serious errors if accidentally you do something wrong, that’s why a very popular saying in the Linux community is:

<code>“To err is human, but to really foul up everything, you need a root password.”</code>

For more examples of sudo commands, please refer to our series of articles:

You might also like:

  • 10 Useful Sudoers Configurations for Setting ‘sudo’ in Linux
  • How to Run ‘sudo’ Without Password in Linux
  • How to Show Asterisks While Typing Sudo Password in Linux

8. mkdir Command

The (make directory) creates a new directory with a name path. However is the directory already exists, it will return an error message “cannot create a folder, folder already exists”.

The mkdir command (make directory) is used to create a new directory with a specified path. However, if the directory already exists, it will return an error message stating, ‘cannot create a folder, folder already exists‘.

<code>mkdir tecmint</code>

Directories can only be created within folders for which the user has write permissions.

9. touch Command

The touch command stands for ‘update the access and modification times of each FILE to the current time.’ The ‘touch‘ command creates the file only if it doesn’t exist

The above is the detailed content of 20 Must-Know Terminal Commands for New Linux 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

Undress AI Tool

Undress AI Tool

Undress images for free

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.

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 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)

Install LXC (Linux Containers) in RHEL, Rocky & AlmaLinux Install LXC (Linux Containers) in RHEL, Rocky & AlmaLinux Jul 05, 2025 am 09:25 AM

LXD is described as the next-generation container and virtual machine manager that offers an immersive for Linux systems running inside containers or as virtual machines. It provides images for an inordinate number of Linux distributions with support

Clear Linux Distro - Optimized for Performance and Security Clear Linux Distro - Optimized for Performance and Security Jul 02, 2025 am 09:49 AM

Clear Linux OS is the ideal operating system for people – ahem system admins – who want to have a minimal, secure, and reliable Linux distribution. It is optimized for the Intel architecture, which means that running Clear Linux OS on AMD sys

How to create a self-signed SSL certificate using OpenSSL? How to create a self-signed SSL certificate using OpenSSL? Jul 03, 2025 am 12:30 AM

The key steps for creating a self-signed SSL certificate are as follows: 1. Generate the private key, use the command opensslgenrsa-outselfsigned.key2048 to generate a 2048-bit RSA private key file, optional parameter -aes256 to achieve password protection; 2. Create a certificate request (CSR), run opensslreq-new-keyselfsigned.key-outselfsigned.csr and fill in the relevant information, especially the "CommonName" field; 3. Generate the certificate by self-signed, and use opensslx509-req-days365-inselfsigned.csr-signk

7 Ways to Speed Up Firefox Browser in Linux Desktop 7 Ways to Speed Up Firefox Browser in Linux Desktop Jul 04, 2025 am 09:18 AM

Firefox browser is the default browser for most modern Linux distributions such as Ubuntu, Mint, and Fedora. Initially, its performance might be impressive, however, with the passage of time, you might notice that your browser is not as fast and resp

How to extract a .tar.gz or .zip file? How to extract a .tar.gz or .zip file? Jul 02, 2025 am 12:52 AM

Decompress the .zip file on Windows, you can right-click to select "Extract All", while the .tar.gz file needs to use tools such as 7-Zip or WinRAR; on macOS and Linux, the .zip file can be double-clicked or unzip commanded, and the .tar.gz file can be decompressed by tar command or double-clicked directly. The specific steps are: 1. Windows processing.zip file: right-click → "Extract All"; 2. Windows processing.tar.gz file: Install third-party tools → right-click to decompress; 3. macOS/Linux processing.zip file: double-click or run unzipfilename.zip; 4. macOS/Linux processing.tar

How to troubleshoot DNS issues on a Linux machine? How to troubleshoot DNS issues on a Linux machine? Jul 07, 2025 am 12:35 AM

When encountering DNS problems, first check the /etc/resolv.conf file to see if the correct nameserver is configured; secondly, you can manually add public DNS such as 8.8.8.8 for testing; then use nslookup and dig commands to verify whether DNS resolution is normal. If these tools are not installed, you can first install the dnsutils or bind-utils package; then check the systemd-resolved service status and configuration file /etc/systemd/resolved.conf, and set DNS and FallbackDNS as needed and restart the service; finally check the network interface status and firewall rules, confirm that port 53 is not

How would you debug a server that is slow or has high memory usage? How would you debug a server that is slow or has high memory usage? Jul 06, 2025 am 12:02 AM

If you find that the server is running slowly or the memory usage is too high, you should check the cause before operating. First, you need to check the system resource usage, use top, htop, free-h, iostat, ss-antp and other commands to check CPU, memory, disk I/O and network connections; secondly, analyze specific process problems, and track the behavior of high-occupancy processes through tools such as ps, jstack, strace; then check logs and monitoring data, view OOM records, exception requests, slow queries and other clues; finally, targeted processing is carried out based on common reasons such as memory leaks, connection pool exhaustion, cache failure storms, and timing task conflicts, optimize code logic, set up a timeout retry mechanism, add current limit fuses, and regularly pressure measurement and evaluation resources.

Install Guacamole for Remote Linux/Windows Access in Ubuntu Install Guacamole for Remote Linux/Windows Access in Ubuntu Jul 08, 2025 am 09:58 AM

As a system administrator, you may find yourself (today or in the future) working in an environment where Windows and Linux coexist. It is no secret that some big companies prefer (or have to) run some of their production services in Windows boxes an

See all articles