A Complete Introduction
William Shotts

#Linux
#Command_Line
🐧 درونمایهٔ پنهان لینوکس را کشف کنید و با قدرت خط فرمان، کنترل کامل سیستم را به دست بگیرید!
اگر تا امروز تنها با ظاهر گرافیکی و رنگارنگ لینوکس کار کردهاید، وقت آن رسیده است که عمیقتر بروید. کتاب The Linux Command Line نوشتهٔ ویلیام شاتس شما را از نخستین دستورها تا نوشتن برنامههای کامل در Bash همراهی میکند — محبوبترین پوستهٔ لینوکس که قلب واقعی سیستم را در اختیار شما میگذارد.
در طول مطالعهٔ این کتاب، مهارتهایی را خواهید آموخت که نسلهای متعددی از کاربران حرفهای لینوکس آنها را به ارث گذاشتهاند:
نویسنده در کنار آموزشهای عملی، شما را با فلسفه و تاریخچهٔ ابزارهایی آشنا میکند که لینوکس امروزی از ابررایانههای یونیکس به ارث برده است.
این کتاب با زبانی ساده، فصلهای کوتاه و تمرینهای عملی، شما را از یک کاربر مبتدی به یک کاربر حرفهای در محیط خط فرمان تبدیل میکند — تا جایی که شاید دیگر سراغ موس نروید!
📚 مناسب برای چه کسانی است؟
برای کاربران تازهوارد به لینوکس، مدیران سیستم، علاقهمندان به امنیت سایبری و هرکسی که میخواهد کنترل واقعی رایانهٔ خود را در دست بگیرد.
✍️ دربارهٔ نویسنده:
ویلیام شاتس بیش از ۱۵ سال است که در حوزهٔ نرمافزار و لینوکس فعالیت میکند. او بنیانگذار وبسایت آموزشی LinuxCommand.org است و با رویکردی آموزشی و صمیمی، هزاران کاربر را با قدرت خط فرمان آشنا کرده است.
📚 فهرست مطالب
بخش اول: یادگیری شل (Shell)
1. شل چیست؟
2. ناوبری
3. بررسی سیستم
4. کار با فایلها و دایرکتوریها
5. کار با دستورات
6. هدایت ورودی و خروجی (Redirection)
7. دیدن جهان از دید شل
8. ترفندهای پیشرفته صفحهکلید
9. مجوزها (Permissions)
10. پردازشها
11. محیط سیستم
12. مقدمهای ملایم بر ویرایشگر vi
13. شخصیسازی خط فرمان (Prompt)
بخش دوم: کارهای رایج و ابزارهای ضروری
14. مدیریت بستهها
15. رسانههای ذخیرهسازی
16. شبکهبندی
17. جستجو برای فایلها
18. آرشیو و پشتیبانگیری
19. عبارتهای منظم (Regular Expressions)
20. پردازش متن
21. قالببندی خروجی
22. چاپ
23. کامپایل برنامهها
بخش سوم: نوشتن اسکریپتهای شل
24. نوشتن اولین اسکریپت
25. شروع یک پروژه
26. طراحی از بالا به پایین (Top-Down Design)
27. کنترل جریان: شاخهای با if
28. خواندن ورودی از کیبورد
29. کنترل جریان: حلقه با while/until
30. عیبیابی
31. کنترل جریان: شاخهای با case
32. پارامترهای موقعیتی (Positional Parameters)
33. کنترل جریان: حلقه با for
بخشهای اضافی
34. رشتهها و اعداد
35. آرایهها
36. مطالب ویژه (Exotica)
⭐ نظرات درباره کتاب The Linux Command Line:
📌 «این کتاب عالی درباره خط فرمان لینوکس فقط یک دکور میز کار نیست، بلکه یک قدرت مخفی است.»
— Ken Hess، Red Hat
📌 «برای کسانی که میخواهند خط فرمان لینوکس را بهخوبی یاد بگیرند و ابزارهای اصلی آن را درک کنند، این کتاب راهنمایی بسیار مؤثر و مفید است.»
— Ben Rothke، RSA Conference
📌 «میتوانم صادقانه بگویم که این راهنمای نهایی مبتدیان لینوکس است.»
— Jayson Broughton، Linux Journal
📌 «این دقیقاً همان چیزی است که یک مبتدی لینوکس برای سرعت گرفتن نیاز دارد. کتاب فراتر از مرور دستورات خط فرمان میرود و به نظریه و نحوه تعامل اجزا میپردازد.»
— Nicholas C. Zakas، Yahoo!
📌 «هر کسی که این کتاب را بخواند و از مثالهای آن استفاده کند، تا پایان کتاب به یک حرفهای خط فرمان یونیکس تبدیل خواهد شد.»
— Sandra Henry-Stocker، ITworld
📌 «رویکرد بسیار قابل دسترس نسبت به موضوع.»
— Federico Lucifredi، Linux Magazine
📌 «اگر میخواهید خط فرمان را شروع کنید، مهارتهای خود را بهبود دهید یا ابزارهای جدید کشف کنید، این کتاب همه چیز را دارد و من کاملاً توصیه میکنم.»
— Phil Bull، نویسنده مستندات رسمی اوبونتو
📌 «بهترین مقدمهای که تاکنون درباره خط فرمان خواندهام.»
— BeginLinux.com
📌 «یک همراه عالی برای کتابهای مقدماتی و پلی به کتابهای برنامهنویسی فنیتر. بسیار توصیه میشود.»
— Game Vortex
📌 «خواندن آن لذتبخش است و در عین حال جدی و مفید.»
— John D. Cook، The Endeavor
📌 «خواندن دلپذیر و مناسب برای معرفی به همکاران یا دوستان تازهکار.»
— Peter N.M. Hansteen، That Grumpy BSD Guy
📌 «اگر تازه وارد لینوکس هستید یا میخواهید فراتر از رابط گرافیکی باشید، این کتاب را در اولویت قرار دهید.»
— Michael Larsen، TESTHEAD
📌 «به همه کارآموزانم از روز اول میدهم. منبعی ضروری و جامع برای آموزش خط فرمان و امنیت اطلاعات است.»
— Matt Barnett، SEVN-X
📌 «اگر میخواهید لینوکس را بهخوبی یاد بگیرید، این کتاب بسیار ساده و پرمحتواست.»
— Untamed Coder
📌 «راهی عالی برای یادگیری نکات کار با فایلهای بزرگ لاگ که برای دفاع سایبری حیاتی هستند.»
— Mark Jeanmougin، @markjx01
📌 «نویسنده شما را از اولین ضربه به ترمینال تا نوشتن برنامههای کامل با خط فرمان هدایت میکند.»
— Xtreme Pentesting، @xtremepentest
📌 «کتاب مورد علاقه من درباره #bash scripting است! هر بار دوباره میخوانم چیز جدیدی یاد میگیرم و عاشق همه کتابهای No Starch Press هستم.»
— Luisa Donato، @Luisa_Donato
You've experienced the shiny, point-and-click surface of your Linux computer--now dive below and explore its depths with the power of the command line.
The Linux Command Line takes you from your very first terminal keystrokes to writing full programs in Bash, the most popular Linux shell (or command line). Along the way you'll learn the timeless skills handed down by generations of experienced, mouse-shunning gurus: file navigation, environment configuration, command chaining, pattern matching with regular expressions, and more.
In addition to that practical knowledge, author William Shotts reveals the philosophy behind these tools and the rich heritage that your desktop Linux machine has inherited from Unix supercomputers of yore.
As you make your way through the book's short, easily-digestible chapters, you'll learn how to:
• Create and delete files, directories, and symlinks
• Administer your system, including networking, package installation, and process management
• Use standard input and output, redirection, and pipelines
• Edit files with Vi, the world's most popular text editor
• Write shell scripts to automate common or boring tasks
• Slice and dice text files with cut, paste, grep, patch, and sed
Once you overcome your initial "shell shock," you'll find that the command line is a natural and expressive way to communicate with your computer. Just don't be surprised if your mouse starts to gather dust.
Table of Contents
Part I: Learning the Shell
1. What Is the Shell?
2. Navigation
3. Exploring the System
4. Manipulating Files and Directories
5. Working with Commands
6. Redirection
7. Seeing the World as the Shell Sees It
8. Advanced Keyboard Tricks
9. Permissions
10. Processes
11. The Environment
12. A Gentle Introduction to vi
13. Customizing the Prompt
Part III: Common Tasks and Essential Tools
14. Package Management
15. Storage Media
16. Networking
17. Searching for Files
18. Archiving and Backup
19. Regular Expressions
20. Text Processing
21. Formatting Output
22. Printing
23. Compiling Programs
Part IV: Writing Shell Scripts
24. Writing Your First Script
25. Starting a Project
26. Top-Down Design
27. Flow Control: Branching with if
28. Reading Keyboard Input
29. Flow Control: Looping with while/until
30. Troubleshooting
31. Flow Control: Branching with case
32. Positional Parameters
33. Flow Control: Looping with for
Additional Sections
34. Strings and Numbers
35. Arrays
36. Exotica
"This excellent Linux command line book is more than cubicle decoration, it's a secret super power." —Ken Hess, Red Hat
"For those looking to master the Linux command line and get an essential understand of the core Linux command line tools, this book is a highly effective and useful guide." —Ben Rothke, RSA Conference
"I can honestly say I have found THE beginner's guide to Linux."
—Jayson Broughton, Linux Journal
"This is exactly what a Linux beginner needs to get up to speed quickly. The book goes beyond simply walking through all of the command line utilities, and ventures into the realm of theory and how things work together."
—Nicholas C. Zakas, Yahoo!
"Anyone who reads this book and makes use of the examples provided will not be able to avoid becoming a Unix command line pro by the time they've hit the end of the book. It provides an excellent introduction to the command line that takes students from knowing nearly nothing to using impressively sophisticated commands."
—Sandra Henry-Stocker, ITworld
"The most approachable tome on the subject."
—Federico Lucifredi, Linux Magazine
"If you would like to start using the command line, improve your existing skills, or simply want to discover tools that you were never even aware existed, this book has everything you need, and I wholly recommend it."
—Phil Bull, author of the official Ubuntu documentation
"This is the best introduction to the command-line I have read."
—BeginLinux.com
"A perfect companion to more remedial guides to Linux that touch on the command only briefly, and also a terrific bridge to deeper technical programming books. Highly recommended."
—Game Vortex
"The Linux Command Line is pleasant to read. It has a light tone, while also getting down to business."
—John D. Cook, The Endeavor
"A delightful read and you can hand it to a junior colleague or friend with more limited Unix shell exposure and be confident that they come back significantly shell-wiser and probably happier."
—Peter N.M. Hansteen, That Grumpy BSD Guy
"If you're a novice Linux player, or just want to get beyond the pretty graphical wrapper of your MacBook, put this book at the top of your list."
—Michael Larsen, TESTHEAD
"I give this book to all my interns on day one. I find this to be an incredibly indispensable resource for teaching not only the basics of the Linux command line, but also anybody looking to get into information security. It's wildly comprehensive without being overwhelming. It does a great job of introducing a basic command, showing you all of the options on how to use the command, and a lot of examples and practical stories to back them up."
—Matt Barnett, Chief Strategist and CoFounder, SEVN-X
"If you want to . . . become a Linux expert, I would recommend a book The Linux Command Line by William Shotts. This book is so simple and gave me a lot of knowledge on Linux."
—Untamed Coder
"A great way to learn some tips on working with those HUGE log files that are critical to cyber defense."
—Mark Jeanmougin, @markjx01
"The author takes you from your very first terminal keystrokes to writing full programs using a Linux shell or command line."
—Xtreme Pentesting, @xtremepentest
"The Linux Command Line by William Shotts will always be my fav book about #bash scripting! It's absolutely amazing! Every time I read it again I learn something new... And I'm definitely in love with all the books published by No Starch Press!!"
—Luisa Donato, @Luisa_Donato
Who Should Read This Book
This book is for new Linux users who have migrated from other platforms. Most likely you are a “power user” of some version of Microsoft Windows. Perhaps your boss has told you to administer a Linux server, or you’re entering the exciting new world of single board computers (SBC) such as the Raspberry Pi. You may just be a desktop user who is tired of all the security problems and wants to give Linux a try. That’s fine. All are welcome here.
About the Author
William Shotts has been a software professional and avid Linux user for more than 15 years. He has an extensive background in software development. He is also the creator of LinuxCommand.org, a Linux education and advocacy site featuring news, reviews, and extensive support for using the Linux command line.









