Different types of shells
不同類型的 Shell
Knowing how to work with Linux shells is an important skill for cybersecurity professionals. Shells can be used for many common tasks. Previously, you were introduced to shells and their functions. This reading will review shells and introduce you to different types, including the one that you'll use in this course.
了解如何使用 Linux shell 是網路安全專業人員的一項重要技能。Shell 可以用於許多常見的任務。之前,您已經了解了 shell 及其功能。本次閱讀將回顧 shell 並介紹不同類型的 shell,包括您在本課程中將使用的那一種。
Communicate through a shell
通過 shell 進行溝通
As you explored previously, the shell is the command-line interpreter. You can think of a shell as a translator between you and the computer system. Shells allow you to give commands to the computer and receive responses from it. When you enter a command into a shell, the shell executes many internal processes to interpret your command, send it to the kernel, and return your results.
正如您之前所探索的,shell 是命令行解釋器。您可以將 shell 視為您與電腦系統之間的翻譯器。Shell 允許您向電腦發出命令並接收其回應。當您在 shell 中輸入命令時,shell 會執行許多內部過程來解釋您的命令,將其發送到核心,並返回結果。
Types of shells 殼層的類型
The many different types of Linux shells include the following:
多種不同類型的 Linux 殼層包括以下幾種:
Bourne-Again Shell (bash)
C Shell (csh)
Korn Shell (ksh)
Enhanced C shell (tcsh)
Z Shell (zsh)
All Linux shells use common Linux commands, but they can differ in other features. For example, ksh and bash use the dollar sign ($) to indicate where users type in their commands. Other shells, such as zsh, use the percent sign (%) for this purpose.
所有的 Linux shell 都使用通用的 Linux 命令,但它們在其他功能上可能有所不同。例如,ksh 和 bash 使用美元符號 ($) 來表示用戶輸入命令的位置。其他 shell,如 zsh,則使用百分比符號 (%) 來達到這個目的。
Bash
Bash is the default shell in most Linux distributions. It’s considered a user-friendly shell. You can use bash for basic Linux commands as well as larger projects.
Bash 是大多數 Linux 發行版中的預設 shell。它被認為是一個使用者友好的 shell。你可以使用 bash 來執行基本的 Linux 命令以及較大型的專案。
Bash is also the most popular shell in the cybersecurity profession. You’ll use bash throughout this course as you learn and practice Linux commands.
Bash 也是網路安全專業中最受歡迎的 shell。在這門課程中,您將在學習和練習 Linux 命令時使用 bash。
Key takeaways 關鍵要點
Shells are a fundamental part of the Linux operating system. Shells allow you to give commands to the computer and receive responses from it. They can be thought of as a translator between you and your computer system. There are many different types of shells, but the bash shell is the most commonly used shell in the cybersecurity profession. You’ll learn how to enter Linux commands through the bash shell later in this course.
Shell 是 Linux 作業系統的基本組成部分。Shell 允許您向電腦發出指令並接收回應。它們可以被視為您與電腦系統之間的翻譯器。有許多不同類型的 Shell,但在網路安全領域中,bash shell 是最常用的 Shell。您將在本課程的後續部分學習如何通過 bash shell 輸入 Linux 指令。