Chapter 3: Linux Basic Commands
Interview Questions
These questions on Linux basic commands definitely come up in interviews. With every reply, say one command out loud – the interviewer can see your confidence.
Linux बेसिक कमांड्सवर इंटरव्ह्यूमध्ये हे प्रश्न नक्की येतात. प्रत्येक उत्तरासोबत एक कमांड बोलून दाखवा – इंटरव्ह्यूअरला तुमचा कॉन्फिडन्स दिसतो.
Linux बेसिक कमांड्स पर इंटरव्यू में ये सवाल ज़रूर आते हैं. हर जवाब के साथ एक कमांड बोलकर दिखाओ – इंटरव्यूअर को आपका कॉन्फ़िडेंस दिखता है.
- Q1. What do the permissions 755 and 644 mean?
- 755 = owner rwx, group r-x, others r-x (typical for directories/scripts). 644 = owner rw-, group r--, others r-- (typical for files).
- Q2. What is the difference between
aptandyum? - APT is the common package tool on Ubuntu and Debian, which use Debian packages. Amazon Linux 2023 uses DNF for RPM packages and retains a
yumcompatibility entry. Older AL2 used YUM. Check the release and repository before translating a command. - Q3. What is the difference between
suandsudo? sustarts a command or shell under a substitute identity subject to local authentication policy.sudorequests an action under a target identity allowed by policy, often root. Authentication, logging and scope depend on the configured policy.- Q4. How do you find which process is using the most memory?
- On Linux procps, use
topand press M to sort by memory, or useps -eo pid,comm,rss --sort=-rss | head -n 11as a bounded resident-memory snapshot. Compare repeated observations and remember resident pages can be shared. - Q5. What is the difference between
killandkill -9? killordinarily sends TERM, which a process can handle. KILL cannot be caught, blocked or ignored and provides no application cleanup handler. Confirm the exact target and authorized action, then verify what actually happened.- Q6. Where are user accounts and passwords stored?
- Local account and group data commonly use
/etc/passwdand/etc/group. Local password hashes may use protected/etc/shadow. Name service can also consult other configured sources. Use approved account lookup tools and avoid sharing protected credential data.
Answer each question in your own words, then explain one command that could verify the relevant fact. The worked interview below shows what evidence to read in the result.
Give evidence for your answer
A useful Linux interview answer connects the command to the job it does. If an interviewer asks about a permission error, start by identifying who requested access and what operation failed. Explain the mechanism in ordinary language. Then name a read-only check and describe what its result would tell you. If a repair changes a shared machine, identify the authorization and verification for that change. Saying the right command name helps when you can tell the interviewer why you chose it and what evidence would make you change your plan.
Use this page as a practice conversation. Read each question, speak a short first answer, then expand on one realistic follow-up. Compare your answer with the worked reasoning. The sample context is a dairy support team maintaining a simple report on a Linux host. You can use the same reasoning for a course project, a personal server or a classroom lab. The names and values are examples. Focus on how the answer changes when the path, identity or command differs.
At the end, give yourself a practical test in a unique folder under your own account. Maintain a short record containing the chosen path, command, main output and conclusion. The person reviewing your lab should be able to distinguish what you ran from what you inferred. If a tool is unavailable locally, use the printed scenario and say which result you could verify. It is reasonable to name the version or distribution you would check before applying a command on an unfamiliar host.
Files, paths and the shell
1. What do you check first when a valid relative path gives “No such file or directory”?
I first find where the command ran. A relative path starts from the current working directory of the process. A name beginning with a slash begins at that process's root directory. If the file is notes/report.txt, opening it from the project's root can work while opening it from another directory fails. I would run pwd and list the expected parent. Check the spelling, including case, and quote the path if it contains spaces. A directory error earlier in the script can leave it in the old location. The main idea is to prove the path before creating a file with the same name somewhere else.
For a follow-up, the user might be in an SSH session on a remote learning instance while their notes are on their own computer. The two shells have separate filesystems and current directories. I would establish which system produced the error. If the relative path starts with a symbolic link, I would check the link and its physical target. The path's written name alone may not identify the actual file that was requested. Record the system and path used in the successful retest.
2. When do you use ls -ld instead of ls -l?
Use the first form when the desired result describes the directory as an object. The -l requests details and -d changes a directory argument from a request to list its contents into a request to show the directory itself. Suppose the support worker cannot open a report beneath published. A listing of the files can show that the report is readable, while the directory mode still prevents the process from finding it. Looking at the directory entry shows its own owner, group and mode. Then I also check any earlier parents and the report's exact access information.
If the interviewer asks about symbolic links, I would identify whether the listing describes the link itself or the target under the options and operand used. A long listing of a link can show where it points. A check of the resolved path answers the target's mode and ownership questions. If the application accesses a different path, both listings need to be interpreted in that application's context. A correct long listing on the wrong directory is weak evidence.
3. How do you prove a copy has the approved contents?
I identify the source revision and the exact destination before copying. If the destination is a directory, the copy implementation may create a file inside it using the source name. If the destination is an existing file, replacement can be a separate decision. A copy that was declined at a prompt can leave the old destination in place. After copying, I compare the intended source and destination with cmp for byte equality or show a targeted diff to review meaningful text changes. I also verify the path the intended reader actually uses. A correct copy in a review folder can exist while the live link still selects an older release.
Byte equality and ownership are separate observations. If the service needs the same owner, permissions or another attribute, I would compare those too. For a simple learning copy, equality status and the exact path are enough. For a recovery copy I would also record its source revision and test the approved recovery procedure. Merely finding a file called backup does not explain which version or attributes it carries.
4. How can a grep command and a shell operator empty a file?
The shell handles redirection. With an ordinary output redirection a regular destination file is opened and can be truncated before grep reads its input. If input and output refer to the same file, it may receive an empty input even though the pattern was correct. I would explain the chronology and choose a separate verified output path for derived data. In a lesson, I demonstrate the safer workflow on known sample files and verify the original line count or its comparison result afterward. In a real incident, I preserve the evidence and consult the verified source revision or backup before I make more writes.
The same argument applies if input and output use different names that resolve to the same object. Paths can refer through a link, and hard links can identify the same inode. A new filename needs to be chosen deliberately in the intended directory. Some shell options can protect certain existing outputs, but understanding which path each operation opens is the important part. I would also capture the grep status immediately when the next action depends on whether it found a match.
Permissions, identity and authority
5. Explain mode 750 for a directory and 640 for a report inside it.
The digits represent owner, group and other, in that order. Read is four, write is two and execute or search is one. For the directory, seven gives the owner all three bits. Five gives its group read and search. Zero denies ordinary access to other. For the report file, six gives its owner read and write. Four gives the group read only. The other class gets zero. The meanings fit a publisher who edits the file and a reviewer group that reads it. The reviewer would need active membership in the group that applies to both objects and search along the entire path.
If the interviewer asks for the symbolic form, I would split the directory into rwx, r-x and ---. The file is rw-, r-- and ---. The actual process may match the owner rather than group. Linux can apply additional access policy too. The calculation establishes the ordinary mode. Inspect the relevant user, group and path before inferring who can use it.
6. Why might a file at 644 fail to open for a web worker?
644 gives ordinary read permission in all three classes for that file. The worker first has to reach it. Each parent directory in the resolved path normally needs search for the worker's credentials. A symlink can make the path include directories you did not expect. The web worker can run as a different local user from the developer's shell. I would confirm the exact underlying file from the server's diagnostic, then check the worker identity and directory permissions. If the basic checks appear correct, inspect the additional ACL, service isolation or security policy with the deployment owner.
The follow-up may say the browser shows 403. That response means a request was refused and can be caused by rules other than file access. I would read the relevant error or access record that narrows the cause. If the application explicitly refused the request, investigate that policy. If the worker could not open a file, the filesystem checklist is useful. Running the successful shell read as root cannot prove the worker's access. I would verify the specific authorized request after the targeted fix.
7. How can someone remove a read-only file?
Removing a name updates a directory entry. For the ordinary access checks, the process needs write and search on its parent to remove the name. Write permission on the file's own contents is a different check. If a trainee owns the containing folder and its mode allows those operations, they can usually rename or remove a read-only sample file. Sticky directories, ACLs, certain filesystem attributes and read-only mounts can impose more restrictions. Some removal tools also prompt about a protected file. The prompt and the kernel's decision are separate parts of the operation.
For a realistic follow-up, an editor may have rights to modify an existing file's contents yet fail to save through a temporary file and a rename. I would inspect what the editor tried to do and check both the file and its parent. Moving across filesystem boundaries can require copying and removal, so it can add source and destination requirements. Report the exact operation before changing the modes.
8. How do chmod, chown and umask relate to one another?
chmod changes a file's mode. chown requests an ownership change and can also change the group according to the syntax and authorization. umask describes permissions to turn off from new object creation requests in the ordinary case. A program that requests mode 666 for a new file under mask 027 commonly gets 640. An existing file can keep its prior mode when reopened. A parent directory's default ACL can change the new object's behavior. I first check whether the problem is the existing owner, existing permissions or the starting mode created by a process.
An interviewer might ask whether chmod g+r will let a particular service user read a file. It adds a bit to the group class. That user needs the corresponding effective group in the actual process and needs search through the path. It can also be relevant whether an ACL is present. Saying “group read is added” is a correct starting statement. The service's complete access needs corroborating evidence.
9. Why is a new group visible in the account database but missing in an old terminal?
A named account query and the process's live credentials describe different things. New sessions can initialize identity and supplementary groups from the account source. An already running shell can retain what it received earlier and pass that state to its child commands. Compare id -Gn as the user in the shell with a named query for that user and verify a fresh authorized login. If the file read is performed by a service, investigate the service worker's actual account and startup configuration. A separate login for the developer may not change access for that service.
If the configured group itself is absent, I would check the appropriate source and who manages it. Local account files are one possible source. Other machines can resolve names through a centrally managed identity service. If the job requires adding one supplementary group to a local account, use the authorized append procedure and verify existing memberships are preserved. A replaced supplementary list may remove unrelated access. A group name still needs to match the owning GID on the resource where it is used.
10. What does sudo do, and what would you ask before requesting it?
Sudo evaluates a request to run an operation under a target user or group. The normal target can be root, while policy can grant a specific action as another user. Authentication, logging and command restrictions are policy decisions. I would ask which operation failed, why it needs another identity and which exact target is appropriate. For the dairy reviewer who needs a group-readable report, ordinary access with the correct group and path is enough. A controlled maintenance action may justify a scoped privileged request. A full administrative shell has a much larger scope.
If asked about su, I would explain that it starts a shell or command under a substitute account, with authentication and session setup governed by the local implementation and policy. Using sudo for a command does not automatically elevate every operation surrounding it. The caller's shell can open a redirection destination before the program runs. And in EC2, a Linux user or a root shell is separate from the IAM credentials used to authorize AWS API operations. I would diagnose the layer that reported the denial.
Reading results and observing processes
11. How would you look for a failure in a large log?
First establish the log source, relevant time window and the operation that failed. I would inspect a small excerpt with head, tail or a pager to learn the format. Then I choose a search or parser appropriate to the fields. A request to the report page and a request for a photo can have different status values. Finding any text with 503 does not isolate the report. For a simple known fixed text I could use grep -nF. With structured logs, use a parser aware of the fields. Record the time, path and filter along with the result.
I would interpret the command's exit status and error output. GNU grep's one status means it selected no lines, while an unreadable path is an error. A later command can overwrite the shell's last status, so capture it immediately. A pipeline can hide a previous stage's error behind a successful final count. This detail matters when a teammate relies on a report that says there were zero failures. I would verify which input was scanned and whether the scan succeeded.
12. When would you follow a log, and what happens when the file is rotated?
A follow command helps when I want to observe entries written during a specific test. I would first check that I am using the correct log and have access. Then I would choose a bounded observation or stop the follower with the appropriate terminal action after a known test request. In many implementations, following an open file can continue observing that object after the application renames it during rotation. The application may now write to another file at the original path. A name-follow option in a supporting tool can reopen the recreated path under documented behavior.
If a follower stays quiet, possible reasons include that no event happened, the server logs somewhere else, the logging buffer has not flushed or the file was replaced. I would generate or identify one known authorized observation and compare path or journal evidence, keeping the time window in the note. I would not assume all Linux distributions log to the same traditional file. The diagnostic goal determines whether a short log excerpt, a follow mode or a service journal query is suitable.
13. How can you find a particular process without stopping an unrelated one?
Identify the host and the process's actual owner, command, parent and start or elapsed time. A tool such as ps can display particular fields for a known PID. A name search provides candidate IDs and can match several workers. It is useful for discovery only. In a learning exercise I capture $! immediately after the shell starts a harmless background child, then compare its process and job listings. This identifies the exact child launched by this session. Process IDs can be reused after exit, so a number from an old note should not be considered an identity check.
A shell job can contain several processes and its job number belongs to the shell that launched it. A managed application may put a service unit around one or more processes. I would inspect the application's manager rather than picking a random process from a list. If a stop is authorized, use the controlled action for that work and verify the result. A process listing can show it is gone, while a service check can establish whether another process replaced it.
14. What do TERM, KILL and wait tell you?
TERM is the normal termination request. A program can handle or ignore it, and a program that handles it may close files or complete part of its work. KILL cannot be caught, blocked or ignored by the process. It does not give the program a user-space handler to finish cleanup, and the operating system may still need an uninterruptible kernel operation to complete before the exit is observed. I would follow the service or task's authorized stopping procedure and gather its status. Sending a signal and confirming the process finished are distinct events.
For a child from my own Bash shell, wait can collect the exit result. A normally completed practice sleep often returns zero. A sleep ended by TERM often gives 143 in Bash, reflecting the convention of 128 plus 15. A successful signal send by itself did not give that result. If the process list shows a zombie, the child has already exited and the remaining record needs parent-side handling. I would identify the parent rather than sending another signal to the exited child.
15. Can a machine have high load, low reported CPU and a slow response?
Yes. Linux load includes runnable work and certain uninterruptible waits. A queue of tasks waiting for a kernel operation can raise load while they use little CPU. First check what time range the measurements cover and how many CPUs are available. With top in Linux procps I would sample more than once and read process states as well as CPU and memory. With a single static ps process listing, some CPU percentages describe the process's lifetime. A graph can use a longer aggregated interval. I need comparable times before drawing a resource conclusion.
If asked to find memory use, I would explain which measure I am reading. Resident memory and virtual address space reveal different things. The operating system can reclaim some cached memory, so small free memory alone is weak evidence of a problem. Correlate host metrics, actual request times and process observations. The slow report could be waiting on a data source even if the web worker is alive. My next step should examine the resource implicated by repeated evidence.
Package managers, reference material and editors
16. How do apt, dnf and yum fit their Linux distributions?
They are package managers for software provided in particular distribution ecosystems. Ubuntu and Debian commonly use APT for Debian packages. Amazon Linux 2023 documents DNF for RPM packages, with the YUM command name pointing to DNF in that release. Older Amazon Linux 2 guides used YUM. I would start with the OS release and the actual available command, then check the intended package source and name. A command with a familiar name may behave differently on another version.
If asked what it means to update, I would name the operation. In APT, an index refresh updates repository information. A separate transaction upgrades installed packages. With DNF, an update check and the installation of those updates are also separate. AL2023 uses versioned repositories, so a check in one configured release may not include newer versions. I would review the candidate list and any dependency or removal plans before authorizing a package change. Afterwards compare the installed record and run the appropriate program or service check.
17. A guide recommends an option your command rejects. What do you do?
I record the exact error and identify what the shell resolved. In Bash, type or command -v can help distinguish a built-in, alias, function and external executable. Check a built-in with the shell's help. Check the installed program's own help, its local manual or the project's reference for the applicable version. A manual page section can distinguish a shell command from a file format of the same name. A system with a different implementation may support a shorter equivalent option. I would test the intended property on known safe data.
A good follow-up asks what happens if the manual does not exist. A small image can omit its manual database or the pages while keeping the binary. I would check the actual executable and installed release, then use an authoritative reference for that environment. A documentation lookup saying no entries does not answer whether a client can run the tool. If the interviewer gives me only a goal, a keyword search in the manual index can identify candidate commands. I would verify which page matches the operation before copying a command.
18. What checks should follow a text editor change to configuration?
I start with the right file and a known before revision. In Vim, verify the relevant mode before a write or quit command. In GNU nano, check the destination shown by Write Out. After writing, read the exact saved path in the shell and compare the candidate against the before version. A unified diff can show one agreed change and any surprise lines. Use the application's official configuration validation to check whether the new value is allowed or a setting is repeated. Keep the approved path and permission requirements visible.
Then verify how the application reads its configuration. An editor's save changes a file. A service may still use settings it loaded before that save. Follow the authorized rollout or reload procedure for that service after validation and test the actual user-facing behavior. If the change is only a practice draft, there is no service to change. If asked how I would discard an experiment, I would explain that leaving without saving affects the unwritten buffer, while an earlier write needs a separate known restore.
Follow-up problems for a second interview round
19. Why can a filename appear in a listing but still fail when you open it?
A listing can enumerate directory names under a different operation from looking up an object by name. In the simple case, directory read lets the process see names. Search permission is needed to resolve a name beneath that directory, and later checks apply to the object itself. A directory test with owner read and no search can show a known name while the attempted file open fails. I would compare the exact command, access request and mode. If another account produced the successful list, its credentials may also be different.
A related case occurs when a link is present and its target is missing. A long listing can show the link's text even though the application cannot open that target. Verify the directory details and follow the intended link with a read-only check. A statement that “the file is listed” can be precise once you say whether the listed object was a regular file, a link or a name whose target lookup failed.
20. What would you prove before retrying an EC2 SSH attempt with a client key?
Use the instance details and the SSH instructions for the actual image to identify the host, port and Linux account. Confirm the private key path on the client computer. AWS shows a restrictive mode such as 400 for a key on macOS or Linux. The key's file access is a local check, and its contents should stay private. A timeout, an account authentication refusal and a client refusing to use an overly accessible key are different observations. Capture the appropriate error text without sharing the key or sensitive account data.
If asked whether changing the key mode repairs a network timeout, I would explain that it changes a local file property. A timeout calls for evidence about the intended endpoint and authorized connectivity. If the client reaches authentication, check the actual user and key pair according to the approved instance setup. Another service's IAM permissions are a separate question. Use the first meaningful diagnostic to decide which part of the setup to verify.
21. A teammate says a diff failed with status one. How do you interpret it?
Read the documented result for the comparison tool. In common diff implementations, zero means equal and one means the compared inputs differ. An error while reading or processing inputs uses another result. If a change is expected, status one can be the state the test is designed to observe. I would read the unified diff and verify that the changed line is the one the request described. Report that meaningful difference instead of calling every nonzero result a failed command.
For an automated follow-up, the distinction determines whether to continue, ask someone to review a change, or stop over a missing input. Compare the exact two paths and preserve the status before running another command. If both inputs are readable and the intended content differs, the result tells you the comparison completed and found a difference. It does not tell you that the new settings are valid, which belongs to the application validator.
22. How do you determine what caused a file operation to fail before choosing a command?
I ask for one reproducible operation and its exact symptom. I distinguish command resolution, syntax and data access. A name lookup failure arises in the shell before the command starts. An unrecognized option tells me a tool or function received the argument and refused it. A missing input gives me a path or environment to verify. A denied open gives me an identity and permission path check. These are different stages. I use a small controlled file if I need to demonstrate expected syntax without inspecting a real system's data.
I close by describing a read-only retest. For example, if a candidate copy looks stale, I verify the chosen source and destination bytes, then check which path the real reader used. I would not jump from the content complaint to reinstalling a binary or adding authority. Preserve each piece of evidence long enough to compare the new result. An interviewer can then see which observation supports the proposed cause and which observation would change my conclusion.
Run a six-minute practical interview exercise
Use Bash and your own ordinary account. The interviewer is a teammate who can watch your reasoning. You can also work alone and speak the answer out loud. Create the following fixture in a unique temporary directory and check the path after the setup. Its old and new report paths have different contents. The request log contains one photo failure. All the data belongs to this local exercise. If a setup command fails, explain the first error before taking another action.
interview_lab=$(mktemp -d "$HOME/linux-interview-lesson.XXXXXXXX") &&
cd -- "$interview_lab" &&
mkdir -- old candidate &&
printf '%s\n' 'Pickup time 06:30' > ./old/report.txt &&
printf '%s\n' 'Pickup time 06:45' > ./candidate/report.txt &&
printf '%s\n' 'report 200' 'photo 503' 'report 200' > ./requests.txt &&
pwd
Show the current directory and read the old and candidate files by their exact paths. Explain why an unqualified report filename does not select either version from the root. You may capture the printed time as evidence for each. If the interviewer gives you an absolute path, state which system needs to interpret it. Verify which file they want before copying.
Make a copy of the candidate into a new file at the lab's root and compare its bytes. State the expected comparison status and how you would inspect a difference. Run a targeted search for the one photo failure and a separate report failure search. Explain why the latter has no result. Capture the status immediately and describe which log tokens the test matched.
Show a long listing of the candidate directory itself and of its report. Explain why directory search and file read are distinct. The interviewer asks whether changing the file mode would restore a missing search bit on its parent. Answer from the described operation without touching an actual permission setting. Say what you would need to confirm about a real service identity before changing access.
The interviewer asks what a read-only file output proves about a real website. Explain that your local check establishes what the known path contains. A browser request can reach another server, link, route or cached output, so verify the approved actual request separately. Tell them which two pieces of evidence your handover would compare.
cp -i ./candidate/report.txt ./review-copy.txt
cmp ./candidate/report.txt ./review-copy.txt
grep -nFx -- 'photo 503' ./requests.txt
if grep -nFx -- 'report 503' ./requests.txt; then
search_result=0
else
search_result=$?
fi
printf 'Report failure search status: %s\n' "$search_result"
ls -ld -- ./candidate ./candidate/report.txt
The photo search should print line two. The report failure search should return status one and no match. The copy comparison should produce no output with status zero. If a trainee says the whole system is healthy, ask which input was checked and what did not follow from it. A stronger answer limits the conclusion to the three supplied log records. When you share the result, include the requested outcome, place, tool and observation. That is a useful pattern whether you are answering an interview or updating a teammate.
To finish, check the practice directory and confirm the set of named fixture files. The cleanup prompts before removing files and requires empty directories. If you skipped a step or added notes inside the directory, inspect the actual contents and remove only the samples you intend. Keep your interview record outside the directory if you want it afterwards.
pwd
ls -la -- ./old ./candidate .
if [ -n "$interview_lab" ] && [ "$(pwd -P)" = "$(cd -- "$interview_lab" && pwd -P)" ]; then
rm -i -- ./old/report.txt ./candidate/report.txt ./review-copy.txt ./requests.txt &&
rmdir -- ./old ./candidate &&
cd -- "$HOME" &&
rmdir -- "$interview_lab"
fi
Score the practice in four areas. Did you identify the exact system and object? Did you choose a command that answers the specific question? Did you explain the expected output or status? Did you verify the result and avoid affecting unrelated objects? If any answer was weak, redo that one step from the fixture. A specific complete explanation is stronger than a memorized list of many commands. Show you can handle a follow-up by changing one observation and adapting your next check.
Check your answers
1. A group member can list one folder yet cannot read a known file inside. Which additional folder permission matters for looking up that name?
A. Search
B. File content write
C. The mask used when the file was first created
Answer and reasoning
A. Search lets the system look up a known name. Check it for all relevant parent directories and verify the access on the file itself.
2. A named query shows a report group that the existing shell lacks. What is the next evidence to collect?
A. A list of all global packages
B. The active groups in a fresh authorized session
C. The report's date from a different server
Answer and reasoning
B. A new session can receive updated group credentials. Compare it with the existing session and then test the actual operation.
3. An APT index shows a candidate for a utility. Which evidence proves the installed executable is the distribution's copy?
A. The candidate name alone
B. The package manager's document title
C. The installed record, actual resolved path and file ownership query
Answer and reasoning
C. Candidate, installed record and executable resolution answer different questions. Ownership connects a particular on-disk path with a package.
4. Which result in the lab shows the copy matched exactly?
A. An existing filename
B. A byte comparison completing with status zero
C. An unrelated grep match
Answer and reasoning
B. The comparison measures equality of the two named inputs. Check that those paths are the intended source and destination.
5. Your quiz answer says a service is healthy because its process is running. Which additional check addresses the visitor symptom?
A. Repeat an approved actual application request and inspect the response.
B. Count every process name on the machine.
C. Change group ownership on the configuration.
Answer and reasoning
A. A live process is one observation. The request result serves as evidence of the particular behavior the visitor needs.
Revision cards
Context before a command
Identify the host, user and exact object. Say what is supposed to happen and which evidence your next command will collect.
Access follows the path
Check a real process's identity, directory search and target permissions. Add ACL or other policy checks when mode and behavior disagree.
Process and service views
Check identity and time with a process listing. Use the proper service manager for managed work and verify the application result.
Meaning of a result
Capture status and error close to the command. Know which data the tool read and what an empty result can prove.
Verify a saved change
Review the current file, compare the approved before version and apply the documented validation. Retest the actual consumer after any authorized deployment.
Correct help for the tool
Use the shell to identify a built-in or external tool. Match the local command, version and manual section before adopting a flag.
Official references
- Bash paths, job control, quoting, redirection and statuses
- Linux pathname lookup and required directory access
- Linux removal and parent directory permissions
- Linux process user and group credentials
- Linux util-linux su reference
- Sudo command policy and target identities
- Linux procps process selection and measurements
- Linux signal handling and process termination
- GNU grep matching and status meanings
- Amazon Linux 2023 package tools and AL2 differences
- AL2023 versioned repositories
- Manual page sections and reference discovery
- Amazon EC2 SSH client and private-key prerequisites
- GNU diff status and unified display
- Vim writing, buffers and quitting