00 kun 00 soat 00 daqiqa 00 sekund

Sizning oxirgi imkoniyatingiz! 'Lituz' promokodi bilan 30% chegirmadan foydalaning!

📚The Software Developer’s Guide to Linux: A practical, no-nonsense guide to using the Linux command line and utilities as a software developer (2024) – David Cohen

32990 UZS

-Do'stlaringizga tafsiya etish!

Tasnif

«The Software Developer’s Guide to Linux: pdf A practical, no-nonsense guide to using the Linux command line and utilities as a software developer» by David Cohen is an indispensable resource tailored for software developers seeking proficiency in Linux environments.

In this comprehensive guide, Cohen delivers a hands-on approach to mastering the Linux command line and utilities, empowering developers with the essential skills needed to navigate, manage, and optimize their workflow within Linux-based systems.

Key highlights of the book include:

1. **Practical Guidance:** Cohen offers practical insights and real-world examples, making complex Linux concepts accessible to developers of all levels. From basic commands to advanced scripting techniques, each topic is explained with clarity and precision.

2. **No-nonsense Approach:** Focused on delivering actionable knowledge, the book cuts through jargon and unnecessary theory, providing developers with the information they need to be productive in Linux environments quickly.

3. **Command Line Mastery:** Readers will learn how to leverage the power of the Linux command line to streamline development tasks, manage files and directories, manipulate text, and automate repetitive processes efficiently.

4. **Utility Toolbox:** Cohen explores a range of essential Linux utilities and tools commonly used in software development, including package managers, version control systems, text editors, debugging tools, and more.

5. **Best Practices:** Throughout the book, Cohen shares best practices and expert tips to help developers optimize their workflow, troubleshoot issues effectively, and maximize productivity in Linux environments.

Whether you’re new to Linux or looking to deepen your understanding of its command line and utilities, «The Software Developer’s Guide to Linux» equips you with the knowledge and skills needed to excel as a software developer in Linux-based ecosystems.

Qo'shimcha ma'lumot

Varaqlar soni:

301

Mundarija

Command-line syntax (read) 3
Command line vs. shell 4
How does the shell know what to run? (evaluate) • 5
A quick definition of POSIX • 6
Basic command-line skills 7
Unix filesystem basics • 7
Absolute vs. relative file paths • 8
Absolute vs. relative pathname review • 10
Opening a terminal • 10
Looking around – command-line navigation • 10
pwd – print working directory • 10
ls – list • 11
Moving around • 12
cd – change directory • 12
find – find files • 13
Reading files • 13
less – page through a file • 14
Making changes • 14
touch – create an empty file, or update modification time for an existing one • 14
mkdir – create a directory • 14
rmdir – remove empty directories • 15
rm – remove files and directories • 15
mv – move or rename files and directories • 16
Getting help 17
Shell autocompletion 18
Conclusion 20
Chapter 2: Working with Processes 21
Process basics 22
What is a Linux process made of? • 23
Process ID (PID) • 24
Effective User ID (EUID) and Effective Group ID (EGID) • 25
Environment variables • 25
Working directory • 25
Practical commands for working with Linux processes 26
Advanced process concepts and tools 28
Signals • 28
Practical uses of signals • 29
Trapping • 29
The kill command • 29
lsof – show file handles that a process has open • 31
Inheritance • 33
Review – example troubleshooting session 33
Conclusion 35
Chapter 3: Service Management with systemd 37
The basics 38
init • 39
Processes and services 39
systemctl commands 40
Checking the status of a service • 40
Starting a service • 41
Stopping a service • 41
Restarting a service • 41
Reloading a service • 42
Enable and disable • 42
A note on Docker 43
Conclusion 43
Chapter 4: Using Shell History 45
Shell history 45
Shell configuration files • 46
History files • 46
Searching through shell history • 47
Exceptions • 47
Executing previous commands with ! 48
Re-running a command with the same arguments • 48
Prepending a command to something in your history • 48
Jumping to the beginning or end of the current line 49
Conclusion 49
Chapter 5: Introducing Files 51
Files on Linux: the absolute basics 52
Plaintext files • 52
What is a binary file? • 52
Line endings • 53
The filesystem tree 53
Basic filesystem operations 54
ls • 54
pwd • 55
cd • 55
touch • 56
less • 57
tail • 57
mv • 57
Moving • 57
Renaming • 58
cp • 58
mkdir • 58
rm • 58
Editing files 59
File types 60
Symbolic links • 61
Hard links • 62
The file command • 62
Advanced file operations 63
Searching file content with grep • 63
Finding files with find • 64
Copying files between local and remote hosts with rsync • 65
Combining find, grep, and rsync • 66
Advanced filesystem knowledge for the real world 67
FUSE: Even more fun with Unix filesystems • 68
Conclusion 69
Chapter 6: Editing Files on the Command Line 71
Nano 72
Installing nano • 72
Nano cheat sheet • 72
File handling • 73
Editing • 73
Search and replace • 73
Vi(m) 73
Vi/vim commands • 74
Modes • 74
Command mode • 74
Normal mode • 75
Tips for learning vi(m) • 76
Use vimtutor • 76
Think in terms of mnemonics • 76
Avoid using arrow keys • 76
Avoid using the mouse • 77
Don’t use gvim • 77
Avoid starting with extensive configuration or plugins • 77
Vim bindings in other software • 79
Editing a file you don’t have permissions for 79
Setting your preferred editor 79
Conclusion 80
Chapter 7: Users and Groups 81
What is a user? 81
Root versus everybody else 82
sudo 82
What is a group? 84
Mini project: user and group management 84
Creating a user • 85
Create a group • 86
Modifying a Linux user • 86
Adding a Linux user to a group • 87
Removing a user from a group • 87
Removing a Linux user • 87
Remove a Linux group • 87
Advanced: what is a user, really? 88
User metadata / attributes • 88
A note on scriptability 90
Conclusion 90
Chapter 8: Ownership and Permissions 93
Deciphering a long listing 93
File attributes 94
File type • 94
Permissions • 95
Number of hardlinks • 95
User ownership • 95
Group ownership • 95
File size • 96
Modification time • 96
Filename • 96
Ownership 96
Permissions 97
Numeric/octal • 98
Common permissions • 99
Changing ownership (chown) and permissions (chmod) 99
Chown • 99
Change owner • 99
Change owner and group • 100
Recursively change owner and group • 100
Chmod • 100
Using a reference • 101
Conclusion • 101
Chapter 9: Managing Installed Software 103
Working with software packages 104
Update your local cache of repository state • 105
Search for a package • 105
Install a package • 106
Upgrade all packages that have available updates • 106
Remove a package (and any dependencies, provided other packages don’t need them) • 106
Query installed packages • 107
Caution required – curl, bash 107
Compiling third-party software from source 108
Example: compiling and installing htop • 110
Install prerequisites • 110
Download, verify, and unarchive the source code • 110
Configure and compile htop • 111
Conclusion 112
Chapter 10: Configuring Software 115
Configuration hierarchy 116
Command-line arguments 118
Environment variables 119
Configuration files 121
System-level configuration in /etc/ • 121
User-level configuration in ~/.config • 121
systemd units 122
Create your own service • 122
Quick note: configuration in Docker 124
Conclusion 125
Chapter 11: Pipes and Redirection 127
File descriptors 128
What do these file descriptors reference? • 129
Input and output redirection (or, playing with file descriptors for fun and profit) 129
Input redirection: < • 129
Output redirection: > • 130
Use >> to append output without overwriting • 131
Error redirection with 2> • 132
Connecting commands together with pipes (, ) 133
Multi-pipe commands • 133
Reading (and building) complex multi-pipe commands • 134
The CLI tools you need to know 134
cut • 134
sort • 135
uniq • 136
Counting • 136
wc • 137
head • 138
tail • 138
tee • 138
awk • 139
sed • 139
Practical pipe patterns 140
“Top X”, with count • 140
curl, bash • 140
Security considerations for curl, sudo, bash • 141
Filtering and searching with grep • 142
grep and tail for log monitoring • 143
find and xargs for bulk file operations • 143
sort, uniq, and reverse numerical sort for data analysis • 144
awk and sort for reformatting data and field-based processing • 145
sed and tee for editing and backup • 145
ps, grep, awk, xargs, and kill for process management • 146
tar and gzip for backup and compression • 146
Advanced: inspecting file descriptors 147
Conclusion 149
Chapter 12: Automating Tasks with Shell Scripts 151
Why you need Bash scripting basics 152
Basics 152
Variables • 152
Setting • 152
Getting • 153
Bash versus other shells 153
Shebangs and executable text files, aka scripts 154
Common Bash settings (options/arguments) • 154
/usr/bin/env • 155
Special characters and escaping • 156
Command substitution • 157
Testing 157
Testing operators • 157
[[ file and string testing ]] • 158
Useful operators for string testing • 158
Useful operators for file testing • 158
(( arithmetic testing )) • 159
Conditionals: if/then/else 160
ifelse • 160
Loops 160
C-style loops • 160
for…in • 161
While • 161
Variable exporting • 162
Functions 162
Prefer local variables • 163
Input and output redirection 164
<: input redirection • 164
> and >>: output redirection • 164
Use 2>&1 to redirect STDERR and STDOUT • 164
Variable interpolation syntax – ${} 165
Limitations of shell scripts 165
Conclusion 166
Citations 166
Chapter 13: Secure Remote Access with SSH 167
Public key cryptography primer 168
Message encryption • 168
Message signing • 169
SSH keys 169
Exceptions to these rules • 170
Logging in and authenticating • 171
Practical project: Set up a key-based login to a remote server 171
Step 1: Open your terminal on the SSH client (not the server) • 171
Step 2: Generate the key pair • 172
Step 3: Copy the public key to your server • 172
Step 4: Test it out! • 172
Converting SSH2 keys to the OpenSSH format 173
What we are trying to achieve • 173
How to convert the SSH2-formatted key to OpenSSH • 174
The other direction: Converting SSH2 keys to the OpenSSH format • 174
SSH-agent 175
Common SSH errors and the -v (verbose) argument 176
File transfer 177
SFTP • 178
SCP • 178
Clever examples • 179
Without SFTP or SCP • 180
Directory upload and .tar.gz compression • 180
Tunnels 181
Local forwarding • 181
Proxying • 181
The configuration file 182
Conclusion 183
Chapter 14: Version Control with Git 185
Some background on Git 186
What is a distributed version control system? 186
Git basics 187
First-time setup • 187
Initialize a new Git repository • 187
Make and see changes • 187
Stage and commit changes • 187
Optional: add a remote Git repository • 188
Pushing and pulling • 188
Cloning a repository • 188
Terms you might come across 189
Repository • 189
Bare repository • 189
Branch • 189
Main/master branch • 190
HEAD • 190
Tag • 190
Shallow • 190
Merging • 190
Merge commit • 191
Merge conflict • 191
Stash • 191
Pull request • 191
Cherry-picking • 192
Bisecting • 192
Rebasing • 193
Best practices for commit messages 196
Good commit messages • 196
GUIs 197
Useful shell aliases 197
Poor man’s GitHub 198
Considerations • 198
1. Connect to your server • 198
2. Install Git • 198
3. Initialize a repository • 199
4. Clone the repository • 199
5. Edit the project and push your changes • 200
Conclusion 200
Chapter 15: Containerizing Applications with Docker 203
How containers work as packages 204
Prerequisite: Docker install 205
Docker crash course 205
Creating images with a Dockerfile 208
Container commands 210
docker run • 210
docker image list • 211
docker ps • 211
docker exec • 212
docker stop • 212
Docker project: Python/Flask application container 212
1. Set up the application • 213
2. Create the Docker image • 215
3. Start a container from your image • 215
Containers vs. virtual machines 216
A quick note on Docker image repositories 217
Painfully learned container lessons 217
Image size • 218
C standard library • 218
Production is not your laptop: outside dependencies • 218
Container theory: namespacing 219
How do we do Ops with containers? 220
Conclusion 220
Chapter 16: Monitoring Application Logs 223
Introduction to logging 224
Logging on Linux can get… weird • 224
Sending log messages • 225
The systemd journal 225
Example journalctl commands 226
Following active logs for a unit • 226
Filtering by time • 226
Filtering for a specific log level • 227
Inspecting logs from a previous boot • 227
Kernel messages • 227
Logging in Docker containers 228
Syslog basics 228
Facilities • 229
Severity levels • 230
Configuration and implementations • 230
Tips for logging 230
Keywords when using structured logging • 230
Severity • 231
Centralized logging 231
Conclusion 233
Chapter 17: Load Balancing and HTTP 235
Basic terminology 236
Gateway • 236
Upstream • 237
Common misunderstandings about HTTP 237
HTTP statuses • 237
Don’t just check for 200 OK • 237
404 Not Found • 238
502 Bad Gateway • 238
503 Service Unavailable • 239
504 Gateway Timeout • 239
Introduction to curl: checking HTTP response status • 239
HTTP headers • 240
Case-insensitive headers • 240
Custom headers • 240
Viewing HTTP headers with curl • 241
HTTP versions • 241
HTTP/0.9 • 241
HTTP/1.0 and HTTP/1.1 • 242
HTTP/2 • 242
HTTP/3 and QUIC • 243
Load balancing • 244
Sticky sessions, cookies, and deterministic hashing • 245
Round-robin load balancing • 246
Other mechanisms • 246
High availability • 246
Troubleshooting redirects with curl • 247
Using curl as an API testing tool • 248
Accepting and displaying bad TLS certificates with curl • 249
CORS • 249
Conclusion 251
Other Books You May Enjoy 255
Index 259

Fikr-mulohazalar

Baho berilmagan.

“📚The Software Developer’s Guide to Linux: A practical, no-nonsense guide to using the Linux command line and utilities as a software developer (2024) – David Cohen&rdquo mahsulotiga birinchilardan bo'lib fikr bildiring;

Email manzilingiz chop etilmaydi. Majburiy bandlar * bilan belgilangan

O'xshash Kitoblar!

Bosh sahifa
E-kitoblar
0
Cart
Mening sahifam