学习 Shell 脚本编程的免费资源
shell

> 
> 你想学习 shell 脚本编程吗？或者你想提升现有的 bash 知识？我收集了以下免费的资源来帮助你学习 shell 脚本编程。
> 
> 
> 


（LCTT 译注：毫无疑问，这些都是英文的）


shell 是一个命令行解释器，它允许你输入命令并获得输出。当你在使用终端的时候，你就已经在看 shell 了。


是的，shell 是一个你可以和它进行交互的命令行界面，你可以通过它给操作系统某种指令。虽然有不同类型的 shell，但是 [bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell))（GNU Bourne-Again Shell）是在各 Linux 发行版中最流行的。


当谈到 shell 脚本编程的时候，也就意味着 —— 用户希望使用脚本来执行多条命令来获得一个输出。


也许你需要学习 shell 脚本编程作为你的课程或者工作的一部分。了解 shell 脚本编程也可以帮助你在 Linux 中自动化某些重复的任务。


不管出于什么原因学习 shell 脚本编程，都可以看看这些我给你展示的资源。


### 最好的免费学习 shell 脚本编程的资源


![](/data/attachment/album/202007/04/093645x1o7fuyaswt7u1ss.png)


还没在你的系统上安装 Linux？不用担心。有很多种方法[在 Windows 上使用 Linux 终端](https://itsfoss.com/run-linux-commands-in-windows/)。你也可以在某些情况下[使用在线 Linux 终端](https://itsfoss.com/online-linux-terminals/)来练习 shell 脚本编程。


#### 1、学习 Shell —— 互动网站


![](/data/attachment/album/202007/04/093705mg525bw6ptzrhbbw.png)


如果你正在找一个互动网站来学习 shell 脚本编程，并且还可以在线试试，“[学习 Shell](https://www.learnshell.org/)” 是一个不错的起点。


它涵盖了基础知识，并且也提供了一些高级的练习。通常，内容还是简明扼要的 —— 因此，我建议你看看这个网站。


#### 2、Shell 脚本编程教程 —— 门户网站


![](/data/attachment/album/202007/04/093721fz80i4brmipirq4c.png)


“[Shell 脚本编程教程](https://www.shellscript.sh/)” 是一个完全专注于 shell 脚本编程的网站。你可以选择免费阅读其中的资源，也可以购买 PDF、实体书籍和电子书来支持他们。


当然，花钱买纸质的版本或者电子书不是强制的。但是，这些免费资源查看起来还是很方便的。


#### 3、Udemy：Shell 脚本 —— 免费视频课程


![](/data/attachment/album/202007/04/093755bawfdd2aw1dl8um2.png)


毫无疑问，[Udemy](https://www.udemy.com) 是最受欢迎的在线课程平台之一。而且，除了付费认证课程之外，它还提供了不包含证书的免费内容。


“[Shell 脚本](https://www.udemy.com/course/shell-scripting-i/)” 是 Udemy 上推荐度最高的免费课程之一。你不需要花费任何费用就可以注册这门课。


#### 4、Udemy：Bash Shell 脚本编程 —— 免费视频课程


![](/data/attachment/album/202007/04/093848jb1x0lx7llik9yii.png)


Udemy 上另一个专注于 [bash shell 脚本编程](https://www.udemy.com/course/complete-bash-shell-scripting/)的有趣且免费的课程。与前面提到的课程相比，这个资源似乎更受欢迎。所以，你可以注册这门课，看看它都教些什么。


别忘了 Udemy 的免费课程不能提供证书。但是，它确实是一个让人印象深刻的免费 shell 脚本编程学习资源。


#### 5、Bash 研究院 —— 互动游戏在线门户


![](/data/attachment/album/202007/04/093906g3btuulbwuqcwulq.png)


顾名思义，“[Bash 研究院](https://guide.bash.academy/)” 专注于向用户提供 bash shell 的教学。


尽管它没有很多的内容，它还是非常适合初学者和有一定经验的用户。不仅仅局限于指导 —— 它也可以提供交互式的游戏来练习，不过目前已经不能用了。


因此，如果这个足够有趣，你可以去看看这个 [Github 页面](https://github.com/lhunath/guide.bash.academy)，并且如果你愿意的话，还可以复刻它并对现有资源进行改进。


#### 6、LinkedIn：学习 Bash 脚本编程 —— 免费视频课程


![](/data/attachment/album/202007/04/093947marcrc8r1aqnr2bx.png)


LinkedIn 提供了大量免费课程来帮助你提成技能，并且为更多工作做好准备。你还可以找到一些专注于 shell 脚本编程的课程，这些课程有助于重温基本技能或者这个过程中获得一些高级技能。


在这里，我提供一个 [学习 Bash 脚本编程](https://www.linkedin.com/learning/learning-bash-scripting) 的课程链接，你还可以发现其他类似的免费课程。


#### 7、高级 Bash 脚本编程指南 —— 免费 PDF 书籍


![](/data/attachment/album/202007/04/094003d3gsgtbekhs3rgb0.png)


这是一个令人印象深刻的《[高级 Bash 脚本编程指南](http://tldp.org/LDP/abs/abs-guide.pdf)》，并且可以免费获得到它的 PDF 版本。这个 PDF 资源没有版权限制，在公开领域是完全免费的。


尽管这个资源主要是提供高级的知识，通过参考这个 PDF 并且开始学习 shell 脚本编程，它还是很适合初学者的。


#### 8、专业 Bash 笔记 —— 免费 PDF 书籍


![](/data/attachment/album/202007/04/094020au5jzqq0qx6u03d1.jpg)


如果你已经对 Bash Shell 脚本编程比较熟悉或者只是想快速总结一下，那这是一个很好的参考。


这个《[专业 Bash 笔记](https://goalkicker.com/BashBook/)》可以免费下载的书有 100 多页，通过简单的描述和例子，这本书涵盖了各种各样的主题。


#### 9、Tutorialspoint —— 门户网站


![](/data/attachment/album/202007/04/094041i5lzt04s5vl5lljy.png)


“[Tutorialspoint](https://www.tutorialspoint.com/unix/shell_scripting.htm)” 是一个非常流行的学习各种编程语言的门户网站。我想说这对于初学者学习基础知识非常好。


也许这不太适合作为一个详细的资源——但是它应该是不错的免费资源。


#### 10、旧金山城市学院：在线笔记 —— 门户网站


![](/data/attachment/album/202007/04/094104x3khjzsadzgah74g.png)


也许这不是最好的免费资源 —— 但是如果你已经为学习 shell 脚本编程做好了探索每种资源的准备，为什么不看看旧金山城市学院的 “[在线笔记](https://fog.ccsf.edu/~gboyd/cs160b/online/index.html)” 呢？


当我在网上随便搜索关于 shell 脚本编程的资源的时候，我偶然遇到到了这个资源。


同样需要注意的是，这个在线笔记可能会有点过时。但是，这应该还是一个值得探索的有趣资源。


#### 荣誉奖: Linux 手册


![](/data/attachment/album/202007/04/094114infsj9o3lcyuza0l.png)


不要忘记，bash 手册也应该是一个相当不错的免费资源，可以用它来查看命令和使用方法。


尽管它不是专门为你掌握 shell 脚本编程而量身打造的，它依然是一个你可以免费使用的重要网络资源。你可以选择访问在线手册，或者直接打开终端然后输入以下命令：



```
man bash

```

### 总结


有很多很受欢迎的付费资源，比如这些[最好的 Linux 书籍](https://itsfoss.com/best-linux-books/)。从网络上的一些免费资源开始学习 shell 脚本编程还是很方便的。


除了我提到的这些，我敢肯定网上还有不计其数的资源可以帮助你学习 shell 脚本编程。


你喜欢换上面提到的资源吗？如果你知道我可能错过的非常棒的免费资源，记得在下面评论区告诉我。




---


via: <https://itsfoss.com/shell-scripting-resources/>


作者：[Ankush Das](https://itsfoss.com/author/ankush/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[Yufei-Yan](https://github.com/Yufei-Yan) 校对：[wxy](https://github.com/wxy)


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


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

A shell is a command-line interpreter that lets you type in commands to get an output. You’re already looking at a shell when you’re using the terminal.

Yes, a shell is a command-line interface that you can interact with to give some type of instructions to the operating system. While there are different types of shells, [ bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)?ref=itsfoss.com) (GNU Bourne-Again Shell) is the popular one used by almost every Linux distro out there.

When talk about shell scripting, that means — a user wants to execute multiple commands to get an output using a script.

You may need to learn shell scripting as part of your course curriculum or as part of your job. Knowing shell scripting also helps you automate certain repeated tasks in Linux.

Whatever be the reason for learning shell scripting, let me show you the resources.

## Top Free Resources to Learn Shell Scripting

![Learn Shell Scripting](https://itsfoss.com/content/images/wordpress/2020/06/Learn-Shell-Scripting.png)

Don’t have Linux installed on your system? No, worries. There are various [ways of using Linux terminal on Windows](https://itsfoss.com/run-linux-commands-in-windows/). You may also [use online Linux terminals](https://itsfoss.com/online-linux-terminals/) in some cases to practice shell scripting.

### 1. Learn Shell [Interactive web portal]

![Learnshell](https://itsfoss.com/content/images/wordpress/2020/06/learnshell.png)

If you’re looking for an interactive web portal to learn shell scripting and also try it online, Learn Shell is a great place to start.

It covers the basics and offers some advanced exercises as well. The content is usually brief and to the point – hence, I’d recommend you to check this out.

### 2. Bash Beginner Series from Linux Handbook [Web Portal]

![Free bash course for beginners](https://itsfoss.com/content/images/2023/09/linuxhandbook-free-bash-course.png)

An online tutorial series for bash beginners. The series is divided into chapters and each chapter has practice exercises.

[Bash Scripting Tutorial Series for Beginners [Free]Get started with Bash Shell script learning with practical examples. Also test your learning with practice exercises.](https://linuxhandbook.com/bash/)![](https://linuxhandbook.com/content/images/2023/09/bash.png)


![](https://linuxhandbook.com/content/images/2023/09/bash.png)

### 3. Shell Scripting Tutorial [Web portal]

![Shell Scripting Tutorial](https://itsfoss.com/content/images/wordpress/2020/06/shell-scripting-tutorial.png)

Shell scripting tutorial is web resource that’s completely dedicated for shell scripting. You can choose to read the resource for free or can opt to purchase the PDF, book, or the e-book to support it.

Of course, paying for the paperback edition or the e-book is optional. But, the resource should come in handy for free.

### 4. Shell Scripting – Udemy (Free video course)

![Shell Scripting Udemy](https://itsfoss.com/content/images/wordpress/2020/06/shell-scripting-udemy.png)

[Udemy](https://www.udemy.com/?ref=itsfoss.com) is unquestionably one of the most popular platforms for online courses. And, in addition to the paid certified courses, it also offers some free stuff that does not include certifications.

Shell Scripting is one of the most recommended free course available on Udemy for free. You can enroll in it without spending anything.

### 5. Bash Shell Scripting – Udemy (Free video course)

![Bash Shell Scripting](https://itsfoss.com/content/images/wordpress/2020/06/bash-shell-scripting.png)

Yet another interesting free course focused on bash shell scripting on Udemy. Compared to the previous one, this resource seems to be more popular. So, you can enroll in it and see what it has to offer.

Not to forget that the free Udemy course does not offer any certifications. But, it’s indeed an impressive free shell scripting learning resource.

### 6. Bash Academy [online portal with interactive game]

![The Bash Academy](https://itsfoss.com/content/images/wordpress/2020/06/the-bash-academy.png)

As the name suggests, the bash academy is completely focused on educating the users about bash shell.

It’s suitable for both beginners and experienced users even though it does not offer a lot of content. Not just limited to the guide — but it also used to offer an interactive game to practice which no longer works.

Hence, if this is interesting enough, you can also check out its [GitHub page](https://github.com/lhunath/guide.bash.academy?ref=itsfoss.com) and fork it to improve the existing resources if you want.

### 7. Bash Scripting LinkedIn Learning (Free video course)

![Learn Bash Scripting Linkedin](https://itsfoss.com/content/images/wordpress/2020/06/learn-bash-scripting-linkedin.png)

LinkedIn offers a number of free courses to help you improve your skills and get ready for more job opportunities. You will also find a couple of courses focused on shell scripting to brush up some basic skills or gain some advanced knowledge in the process.

Here, I’ve linked a course for bash scripting, you can find some other similar courses for free as well.

[Bash Scripting (LinkedIn Learning)](https://www.linkedin.com/learning/learning-bash-scripting?ref=itsfoss.com)

### 8. Advanced Bash Scripting Guide [Free PDF book]

![Advanced Bash Scripting Pdf](https://itsfoss.com/content/images/wordpress/2020/06/advanced-bash-scripting-pdf.png)

An impressive advanced bash scripting guide available in the form of PDF for free. This PDF resource does not enforce any copyrights and is completely free in the public domain.

Even though the resource is focused on providing advanced insights. It’s also suitable for beginners to refer this resource and start to learn shell scripting.

[Advanced Bash Scripting Guide [PDF]](http://tldp.org/LDP/abs/abs-guide.pdf?ref=itsfoss.com)

### 9. Bash Notes for Professionals [Free PDF book]

![Bash Notes For Professional](https://itsfoss.com/content/images/wordpress/2020/06/Bash-Notes-for-Professional.jpg)

This is good reference guide if you are already familiar with Bash Shell scripting or if you just want a quick summary.

This free downloadable book runs over 100 pages and covers a wide variety of scripting topics with the help of brief description and quick examples.

[Download Bash Notes for Professional](https://goalkicker.com/BashBook/?ref=itsfoss.com)

### 10. Tutorialspoint [Web portal]

![Tutorialspoint Shell](https://itsfoss.com/content/images/wordpress/2020/06/tutorialspoint-shell.png)

Tutorialspoint is a quite popular web portal to learn a variety of [programming languages](https://en.wikipedia.org/wiki/Programming_language?ref=itsfoss.com). I would say this is quite good for starters to learn the fundamentals and the basics.

This may not be suitable as a detailed resource — but it should be a useful one for free.

### 11. City College of San Francisco Online Notes [Web portal]

![Scripting Notes Ccsf](https://itsfoss.com/content/images/wordpress/2020/06/scripting-notes-ccsf.png)

This may not be the best free resource there is — but if you’re ready to explore every type of resource to learn shell scripting, why not refer to the online notes of City College of San Francisco?

I came across this with a random search on the Internet about shell scripting resources.

Again, it’s important to note that the online notes could be a bit dated. But, it should be an interesting resource to explore.

[City College of San Francisco Notes](https://fog.ccsf.edu/~gboyd/cs160b/online/index.html?ref=itsfoss.com)

### Honorable mention: Linux Man Page

![Bash Linux Man Page](https://itsfoss.com/content/images/wordpress/2020/06/bash-linux-man-page.png)

Not to forget, the man page for bash should also be a fantastic free resource to explore more about the commands and how it works.

Even if it’s not tailored as something that lets you master shell scripting, it is still an important web resource that you can use for free. You can either choose to visit the man page online or just head to the terminal and type the following command to get help:

`man bash`


### Wrapping Up

There are also a lot of popular paid resources just like some of the [best Linux books](https://itsfoss.com/best-linux-books/) available out there. It’s easy to start learning about shell scripting using some free resources available across the web.

In addition to the ones I’ve mentioned, I’m sure there must be numerous other resources available online to help you learn shell scripting.

Do you like the resources mentioned above? Also, if you’re aware of a fantastic free resource that I possibly missed, feel free to tell me about it in the comments below.