Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Software Developer's Guide to Linux

You're reading from   The Software Developer's Guide to Linux A practical, no-nonsense guide to using the Linux command line and utilities as a software developer

Arrow left icon
Product type Paperback
Published in Jan 2024
Publisher Packt
ISBN-13 9781804616925
Length 300 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Christian Sturm Christian Sturm
Author Profile Icon Christian Sturm
Christian Sturm
David Cohen David Cohen
Author Profile Icon David Cohen
David Cohen
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. How the Command Line Works 2. Working with Processes FREE CHAPTER 3. Service Management with systemd 4. Using Shell History 5. Introducing Files 6. Editing Files on the Command Line 7. Users and Groups 8. Ownership and Permissions 9. Managing Installed Software 10. Configuring Software 11. Pipes and Redirection 12. Automating Tasks with Shell Scripts 13. Secure Remote Access with SSH 14. Version Control with Git 15. Containerizing Applications with Docker 16. Monitoring Application Logs 17. Load Balancing and HTTP 18. Other Books You May Enjoy
19. Index

Working with Processes

As a developer, you are already intuitively familiar with processes. They are the fruits of your labor: after writing and debugging code, your program finally executes, transforming into a beautiful operating system process!

A process on Linux can be a long-running application, a quick shell command like ls, or anything that the kernel spawns to do some work on the system. If something is getting done in Linux, a process is doing it. Your web browser, text editor, vulnerability scanner, and even things like reading files and the commands you’ve learned so far all spawn a process.

Linux’s process model is important to understand because the abstraction it gives you – the Linux process – is what all the commands and tools you’ll use to manage processes depend on. Gone are the details you’re used to seeing from a developer’s perspective: variables, functions, and threads have all been encapsulated as “a process.” You’re left with a different, external set of knobs to manipulate and gauges to check: process ID, status, resource usage, and all the other process attributes we’ll be covering in this chapter.

First, we’ll take a close look at the process abstraction itself, and then we’ll dive into useful, practical things you can do with Linux processes. While we’re covering the practical aspects, we’ll pause to add detail to a few aspects that are a common source of problems, like permissions, and give you some heuristics for troubleshooting processes.

In this chapter, you’ll learn about the following topics:

  • What a Linux process is, and how to see the processes currently running on your system
  • The attributes a process has, so you know what information you can gather while troubleshooting
  • Common commands for viewing and finding processes
  • More advanced topics that can come in handy for a developer actually writing programs that execute as Linux processes: Signals and inter-process communication, the /proc virtual filesystem, seeing open file handles with the lsof command, and how processes are created in Linux

You’ll also get a practical review of everything you’ve learned in an example troubleshooting session that uses the theory and commands we cover in this chapter. Now, let’s dive into what exactly a Linux process is.

You have been reading a chapter from
The Software Developer's Guide to Linux
Published in: Jan 2024
Publisher: Packt
ISBN-13: 9781804616925
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime