终端基础：Linux 终端入门
终端基础
![](/data/attachment/album/202308/18/091651g2hm56ps68k65bhc.jpg)



> 
> 想了解 Linux 命令行的基础知识吗？ 这是一个带有实践方法的教程系列。
> 
> 
> 


Linux 终端可能令人生畏。这块黑色的屏幕只能使用命令。很容易让人感到迷失。


问题是 Linux 命令行是一个很大的话题。你只需使用命令即可管理整个系统。我的意思是，这就是系统管理员、网络工程师和许多其他工作的角色。


**本教程集的目的不是让你做好工作准备。它旨在为你提供 Linux 命令行之旅的起点。** 它将为你提供足够的能力来使用终端并了解一些基本知识，例如读取文件和编辑文件。


由于这只是开始，所以大部分教程都属于“文件操作”类别。这是大多数 Linux 书籍和课程的起点。



> 
> ? 最好的学习方法就是自己动手。我以“实践模式”编写了这些教程，以便你可以在 Linux 系统上参照这些示例。本系列的每一章都包含一些示例练习来锻炼。跟着学、多练习，你很快就能熟练掌握 Linux 命令行。
> 
> 
> 


### 第 0 章：熟悉终端和术语


当你对终端完全陌生时，即使在阅读教程时你也会发现自己迷失了方向。那是因为你应该知道至少你得理解最简单的术语。


下面的文章将帮助你解决其中的一些问题。虽然我分享的一些技巧可能对你来说有点超前或不太有用，但你会发现很多有用的东西。



> 
> **[19 个基础而重要的 Linux 终端技巧](https://itsfoss.com/basic-terminal-tips-ubuntu/)**
> 
> 
> 


### 第 1 章：更改目录


在第一章中，学习使用绝对路径和相对路径切换目录（文件夹）。这样，你就可以在 Linux 命令行中切换。



> 
> **[在 Linux 终端更改目录](https://itsfoss.com/change-directories/)**
> 
> 
> 


### 第 2 章：创建目录


现在你已经了解了如何切换目录，接下来了解如何创建新目录。



> 
> **[在 Linux 终端创建目录](/article-15595-1.html)**
> 
> 
> 


### 第 3 章：列出目录中的内容


你已经很好地掌握了目录。学习查看目录内部并查看它们有哪些文件和子目录。



> 
> **[在 Linux 终端列出目录](https://itsfoss.com/list-directory-content/)**
> 
> 
> 


### 第 4 章：创建文件


关于目录已经足够了。了解在 Linux 命令行中创建新文件。



> 
> **[在 Linux 终端创建文件](/article-15643-1.html)**
> 
> 
> 


### 第 5 章：读取文件


文件里面有什么？在本章中学习阅读文本文件。



> 
> **[在 Linux 终端读取文件](https://itsfoss.com/view-file-contents/)**
> 
> 
> 


### 第 6 章：删除文件和目录


现在你已经学会了创建新文件和文件夹，是时候删除它们了。



> 
> **[在 Linux 终端删除文件和目录](/article-15809-1.html)**
> 
> 
> 


### 第 7 章：复制文件和目录


在终端基础知识系列的本期中，继续进行文件操作并学习复制文件和目录。



> 
> **[在 Linux 终端复制文件和目录](/article-16053-1.html)**
> 
> 
> 


### 第 8 章：移动文件和目录


移动文件操作就像剪切粘贴一样。你也可以使用相同的方法重命名文件和目录。



> 
> **[在 Linux 终端移动文件和目录](https://itsfoss.com/move-files-linux/)**
> 
> 
> 


### 第 9 章：编辑文件


作为最后一个主要的文件操作，学习在命令行中编辑文本文件。



> 
> **[在 Linux 终端编辑文件](https://itsfoss.com/edit-files-linux/)**
> 
> 
> 


### 第 10 章：获取帮助


现在你已经了解了大量基本的 Linux 命令行操作，是时候了解如何在终端本身中获取帮助了。



> 
> **[在 Linux 终端获取帮助](https://itsfoss.com/linux-command-help/)**
> 
> 
> 


### 从这往哪儿走？


现在你已经更熟悉终端并了解命令行中的基本文件操作，你可能想知道接下来要怎么做。


我建议你购买一本 Linux 书籍，例如《How Linux Works》。不过，你可以从你遇到的任何 Linux 书籍开始。这里有一些 [我喜欢的几本 Linux 书籍](https://itsfoss.com/best-linux-books/)。


还不想花钱买书吗？ 不用担心！ 这里有一些 [你可以下载的免费 Linux 电子书](https://itsfoss.com/learn-linux-for-free/)。


Bash 脚本也是 Linux 学习中不可或缺的一部分。即使你不必编写 Shell 脚本，如果你了解基础知识，你也应该能够理解使用 Linux 时遇到的脚本。



> 
> **[Bash 基础知识系列](https://itsfoss.com/tag/bash-basics/)**
> 
> 
> 


学无止境。不可能面面俱到。但是，如果你至少了解基础知识，就能帮助你更有效地使用系统。


? 希望你喜欢这个 Linux 终端教程系列。请在评论部分分享你的反馈。




---


via: <https://itsfoss.com/linux-terminal-basics/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
# Getting Started With Linux Terminal

Want to know the basics of the Linux command line? Here's a tutorial series with a hands-on approach.

The Linux terminal could be intimidating. The dark screen with just commands to use. It's easy to feel lost.

The thing is that Linux command line is a vast topic. You can manage the entire system using just the commands. I mean that's the role of sysadmins, network engineers and many other jobs.

**The aim of this tutorial collection is not to make you job-ready. It intends to give you the starting point of your Linux command line journey.** It will give you enough to navigate the terminal and understand a few basic things like reading files and editing them.

Since it's just the beginning, most of the tutorials are in the 'file operation' category. That's where most Linux books and courses begin.

## Prerequisite

When you are absolutely new to the terminal, you'll find yourself lost even while reading the tutorials. That's because you may not always understand even the simplest of terms.

The article below will help you with some of that. While some of the tips I shared may be a little advance or not-so-useful for you at this moment, you'll find plenty of useful stuff.

[19 Basic But Essential Linux Terminal Tips You Must KnowLearn some small, basic but often ignored things about the terminal. With the small tips, you should be able to use the terminal with slightly more efficiency.](https://itsfoss.com/basic-terminal-tips-ubuntu/)![](https://itsfoss.com/content/images/wordpress/2021/12/ubuntu-terminal-basic-tips.png)


![](https://itsfoss.com/content/images/wordpress/2021/12/ubuntu-terminal-basic-tips.png)

## What will you learn here?

**Changing directories**: In the first chapter, learn to switch directories (folders) using absolute and relative paths. This way, you can navigate in the Linux command line.**Making directories**: Now that you know about switching directories, learn about creating new ones.**Listing directory content**: You are getting a good grasp of the directories. Learn to see inside directories and see what files and subdirectories do they have.**Creating files**: Enough about directories. Learn to create new files in the Linux command line.**Reading files**: What's inside the file? Learn to read text files in this chapter.**Deleting files and directories**: Now that you have learned to create new files and folders, it's time to delete them.**Copying files and directories**: Keep on with the file operations and learn to copy files and directories in this installment of the terminal basics series.**Moving files and directories**: Moving file operation is like cut-paste. You can use the same method for renaming files and directories as well.**Editing files**: As the last major file operation, learn to edit text files in the command line.**Getting help**: Now that you have learned plenty of the basic Linux command line operation, it's time to know how you can get help in the terminal itself.

## Where to go from here?

Now that you are more comfortable with the terminal and know the basic file operations in the command line, you may wonder what comes next.

I will suggest getting a Linux book like How Linux Works. However, you can start with any Linux book you come across. Here are a [few Linux books I love](https://itsfoss.com/best-linux-books/).

[Best Linux Books For Beginners to Advanced Linux UsersHere are some Linux book recommendations to improve your knowledge. These books cater to the need of beginners and experts and help you master Linux concepts.](https://itsfoss.com/best-linux-books/)![](https://itsfoss.com/content/images/wordpress/2020/06/best-linux-books-featured-1.jpg)


![](https://itsfoss.com/content/images/wordpress/2020/06/best-linux-books-featured-1.jpg)

Don't want to spend money on books yet? No worries! Here are some [free Linux ebooks you can download](https://itsfoss.com/learn-linux-for-free/).

[20 Best Linux Books You Can Download For Free LegallyLet me share the best resource to learn Linux for free. This is a collection of Linux PDFs that you can download for free to learn Linux.](https://itsfoss.com/learn-linux-for-free/)![](https://itsfoss.com/content/images/wordpress/2017/02/free-ebooks-linux.png)


![](https://itsfoss.com/content/images/wordpress/2017/02/free-ebooks-linux.png)

Bash scripting is also an integral part of Linux learning. Even if you don't have to write shell scripts, if you know the basics, you should be able to understand scripts you come across while using Linux.

[Learn Bash Scripting For Free With This Tutorial SeriesNew to bash? Start learning bash scripting with this series in am organized manner. Each chapter also includes sample exercises to practice your learning.](https://itsfoss.com/tag/bash-basics/)![](https://itsfoss.com/content/images/2023/07/bash-basics.png)


![](https://itsfoss.com/content/images/2023/07/bash-basics.png)

There is no limit to learning. It's impossible to know it all. Yet, if you know at least the basics, it helps you in using the system more effectively.

*🗨 I hope you like this Linux terminal tutorial series. Do share your feedback in the comments section.*