What are exit codes in Linux?
Programs conventionally return zero for success and nonzero for failure. Bash stores the last command's status in `$?`.
The question library
Explore practical questions, clear explanations, and code examples across developer technologies.
Showing 2281–2292 of 3610 questions
Programs conventionally return zero for success and nonzero for failure. Bash stores the last command's status in `$?`.
Absolute paths start at `/`; relative paths are resolved from the current working directory.
Use `cp`, `mv`, and `rm`. Inspect paths before destructive operations, especially with recursive deletion.
Read, write, and execute bits apply to owner, group, and others. Directory execute permission allows traversal.
Processes and files have user and group identities. `sudo` permits approved commands to run with elevated privileges.
A hard link is another directory entry for the same inode. A symbolic link stores a path to another target.
Use `ps` for a snapshot, `top` for a live view, and `pgrep` to search process names or command lines.
A process has its own virtual address space; threads within one process share memory and many resources.
Send SIGTERM first so the process can clean up. Use SIGKILL only if graceful termination fails.
A shell can run jobs in the foreground or background and manage them with `jobs`, `fg`, and `bg`.
Combine system-wide views with per-process information; load average, CPU utilization, and memory pressure are different measurements.
A systemd unit describes a managed service and its lifecycle. `systemctl` inspects, starts, stops, and enables units.