Ravindra BagaleCourses & study guides मराठी Track your progress

Chapter 3: Linux Basic Commands

AWS Cloud

3.1 Why Linux?

Friends, most servers in the cloud run on Linux, and they have no graphical desktop – all the work happens from the terminal. That is why AWS is incomplete without learning Linux.

Linux is a common choice for cloud servers. A Linux distribution combines the kernel with packages, tools and a maintenance policy. EC2 supports several Linux distributions, including Amazon Linux and Ubuntu. A server image may omit a graphical desktop. You can manage the instance through a shell such as bash over an approved remote connection.

Linux file-system hierarchy

/                  root of everything
├── bin, sbin      essential commands (may link into /usr)
├── boot           kernel and boot loader
├── dev            device files (/dev/nvme0n1, /dev/xvda)
├── etc            configuration files (nginx, ssh, fstab, passwd)
├── home           users' home folders (/home/ec2-user, /home/ubuntu)
├── root           home of the root user
├── opt            optional / third-party software
├── tmp            temporary files (subject to cleanup policy)
├── usr            programs, libraries, docs (/usr/share/nginx/html)
├── var            variable data: logs (/var/log), web (/var/www), databases (/var/lib/mysql)
├── proc, sys      virtual files with kernel & hardware info
└── mnt, media     mount points for extra disks

On the Mauli Dairy server these folders will be used like this: the website files in /usr/share/nginx/html or /var/www/html, the Nginx config in /etc/nginx, and the logs in /var/log. Once this map is in your head, you will immediately know where to look for any file.

Everything is a file

In Linux, disks (/dev/nvme1n1), processes (/proc/1234) and even hardware info are represented as files. Paths are case-sensitive: Index.html and index.html are different files.

Ravindra Bagale's Tip

Many students type cd /Home or Index.html and get stuck with "file not found". Paths in Linux are case-sensitive – Index.html and index.html are two different files. Use the Tab key, and the spelling and case will come out right automatically.

Lab

Chala, EC2 var login karun cat /etc/os-release chalva, mag ls / aani ls /etc bagha. Varchya tree madhle pratyek folder samor ek line liha – udaharan mhanje /var/log madhe logs, /etc madhe config files.

Locate the parts inside a Linux EC2 guest

Locate the parts inside a Linux EC2 guestDistributionPackages and maintenanceShell and applicationsThe programs you useLinux kernelProcesses, memory, files, devicesVirtual machine boundaryGuest view and AWS resources
Read all steps
  1. Distribution

    A distribution combines the Linux kernel with user-space tools, packages and maintenance choices. Its release and configuration determine which commands and service tools are installed.

  2. Shell and applications

    A shell such as Bash reads command lines. Application processes perform work such as serving a website. A server can operate without a graphical desktop while still running many programs.

  3. Linux kernel

    The kernel coordinates resources and enforces operating-system permissions. It exposes interfaces used by programs. A shell and the kernel have different responsibilities.

  4. Virtual machine boundary

    EC2 presents resources to the guest operating system. Linux can report its interfaces and disks, while AWS records instance, volume and network configuration. Compare both views when diagnosing a cloud resource.

From an AWS server to a running website

Suppose Mauli Dairy asks for a small page that tells buyers when their delivery desk opens. The owner understands the page and the price of a server, but wants to know where the page actually lives. A web browser on their phone can show it from far away. Somewhere, an application receives the request, reads the content and replies. Linux is the operating system on many of the servers that do that work. Learning a little about it lets you walk the path from a customer’s result back to an exact application, file and machine.

Start with two separate jobs. The AWS console lets you manage an EC2 instance and related cloud resources. Inside the instance, Linux manages the software that reads files, uses memory and talks to the network. A running instance in the console tells you something about the virtual computer. It does not tell you whether its web process has started or whether the web page is the intended one. That second job requires observations from the operating system and from a test request. Keep the two kinds of evidence side by side.

A terminal is one common way to work inside the server. You can use a terminal on your own laptop and a secure remote session to view and operate a shell on an instance. The window you look at remains on your laptop. The shell that runs a command can be somewhere else. On a Linux server built from a small image there might be no desktop to click through. A short command that reports the file or process you need is convenient, especially when you want another learner to reproduce the same check.

This lesson starts with a small question: what did this machine boot, and where would you look for the piece you need? It has a read-only inventory on a disposable Linux VM and a second small lab that uses your own files. You may read through the worked results without launching a cloud resource. Code here assumes a regular user and the Bash shell where shell syntax matters. On your own machine, keep all practice writes in the unique folder created later.

Meet the kernel, distribution and shell

Think of starting a program as making a request for work to happen. The program needs processor time, some memory, and a way to reach files and devices. The Linux kernel manages those shared resources. A program can ask the kernel to open a file or make a connection through operating-system interfaces called system calls. When a request is denied, the program usually receives a result indicating failure and can print a message. You may first learn this as “Permission denied,” but underneath it is an answer to a specific request from a particular process.

The kernel is one component of a usable system. A Linux distribution brings the kernel together with tools, libraries, packages, defaults and a way to keep them updated. Ubuntu and Amazon Linux can both run Linux kernels while providing different package managers, default services and release policies. When someone in class says “this is Linux,” ask whether they mean the kernel family or the complete distribution they installed. The distinction matters when you choose an installation command or report the version of a bug.

The shell is another layer. Bash reads an input line, interprets syntax such as quotes and redirections, and carries out built-in operations or starts programs. A utility such as ls is a separate command you can use to ask for a file listing. Bash can select that utility according to its search rules. The terminal displays the interactions. The same Linux server can have Bash and other shells installed, and a shell script may require one of them specifically. Linux knowledge includes finding which environment you have rather than assuming that every prompt behaves alike.

Follow one command to make that picture concrete. You type ls /etc. The terminal sends input to the shell. The shell sees a command with an argument and runs the appropriate program. The program asks the kernel to open and read the directory. The kernel checks whether those requests are allowed for the process, and the listing program formats the results. Your terminal displays the text. The directory is still where it was. Seeing the names did not require you to move into the directory or open an editor.

Now change the example to cd /etc in a disposable terminal. The shell itself carries out the directory change so later relative paths begin from a different place. Verify with pwd. This is why one command can show the contents of a location while another changes the shell’s location. The commands may both accept paths, and that similarity can hide the difference from a new learner. Name the outcome you want first: inspect this location, or change my starting point for later commands.

A server without a desktop can still run useful software. Its background processes may handle web requests, run scheduled reports or store database records while no person is logged in. A known login only gives you a new shell process. It is separate from the background process that answers the dairy’s customers. Once you see that relationship, a question such as “will the site disappear when I close this terminal?” can be answered by asking how the site is run and supervised.

Read the system you have before choosing a command

An Amazon Machine Image, or AMI, gives EC2 information about the software and storage it uses to launch an instance. Starting two instances from the same image can give them similar initial software. Each running instance then has its own current state. The changes you make to a file on one running instance do not automatically appear on another. This is one reason to keep the exact image, instance and software version in your lab notes. It also explains why a recipe needs instructions for repeating the configuration.

When the class uses two different images, compare them before attempting a package installation. Start by reading the distribution name and version. uname -s reports the kernel name. uname -r reports its release. uname -m reports the machine hardware name as seen by the running system. On Linux EC2 you will often see an x86 or Arm naming convention. Read the information as separate lines. A matching kernel name is compatible with different distribution releases, and those releases can still choose different packages.

cat /etc/os-release
uname -s
uname -r
uname -m
hostname
whoami

Here is one way to describe a hypothetical observation. The distribution name says Amazon Linux and an associated version identifies the release series. The kernel name says Linux. The machine type says aarch64. The hostname names a specific lab instance. The login account is an ordinary user. Another student with Ubuntu may also see Linux for the kernel name while having different distribution information and possibly a different CPU architecture. Read all of those details before you copy a package name or download a prebuilt executable.

When the wrong binary architecture is selected, there can be an execution-format error. That message is a clue about what can run on the system, not a request to adjust all file permissions. In a real deployment, use packages or builds that match the source and target platforms. In this read-only lab, you can learn the idea by comparing the architecture fields on two machine inventories. No download is needed just to make the comparison.

Different images can also start with different default login names. For a real lab connection, read the name documented for the AMI or supplied by the trainer. Use whoami after you log in to confirm which account the remote shell is using. A username used by one distribution is not a general name shared by all Linux images. If you did get a terminal but do not recognise the host or identity, stop and confirm the lab details before running writes.

On some systems a shell runs in a container rather than on a virtual machine’s main environment. A container can package a different set of tools and a different root directory while using the host’s Linux kernel through its environment. A distribution information file describes the visible user-space filesystem. A kernel check describes the running kernel. This is the same distinction from earlier. If those readings do not seem to match your expectations, verify whether the terminal is inside the guest operating system, inside a container, or still on your laptop.

Use the filesystem map to ask better questions

Draw the root directory as a single slash at the top. Paths beneath it form a tree of directory entries. Your home is one branch where the class can keep its own notes and exercises. /etc is a conventional place for host configuration. /var is a conventional place for data that changes as the machine runs, including logs or application state in many distributions. Treat these as places to check first. The exact path of an application will depend on where and how it was installed and what its configuration says.

For the dairy website, separate the page, the web server's configuration and a record of visits. The page is what the server might read when a matching request arrives. Configuration describes such things as which listener, host or content directory to use. A log records observations from the program as it handles requests. Each affects a different question. If the page title is wrong, inspect the content that is actually being served. If a request never reaches the application, inspect the path and process. If you want to know when an incident happened, find the relevant recorded evidence.

Look at a package's paths for the same idea. The runnable program might be in /usr/bin or /usr/sbin. The host configuration might live in a directory under /etc. Documentation can be shipped under /usr/share. User-created documents normally belong somewhere the user owns. A quick listing can show a path's kind and access, but it does not tell you which configuration a particular running process read when it began. For that question, inspect its documented startup configuration in the appropriate service tools.

Several shorthand names can be confusing. / means the root of the filesystem tree. /root commonly names the root user's home directory. When you are logged in as a regular user, ~ normally expands to your own home through the shell. Those are three different names. On a teaching server, you can print "$HOME" and compare it with pwd. On first login the two often agree, but after changing directories only pwd describes where your next relative path starts.

Consider /tmp as scratch space under a system policy. Temporary files may be removed by startup or scheduled cleanup depending on the host. Choose a durable location for something you need to keep and a uniquely named temporary directory for experiments. Some distributions expose traditional directories as links into /usr. Use ls -ld to see what a particular name is on your machine. If you cannot see the entry or it is a link, name that evidence before drawing a conclusion about the directory tree.

Filesystems can be mounted at different places in the same tree. A separate storage device could hold the filesystem mounted at /data or a home directory branch. From the perspective of a program it still uses a normal path. That view is independent of which underlying device supplies the filesystem. If the lesson later asks you to find free space, use an observation about the specific mounted filesystem rather than guessing from the physical disk's size. You will see those layers more deeply in the storage chapters.

The phrase “everything is a file” gives you intuition about the interface. Plenty of useful information is represented through paths and read operations, including virtual files under /proc and special device nodes under /dev. A /proc entry can be generated from current kernel information. A device node can be a doorway to a block device rather than a document stored in a folder. Check the kind of entry and use documented read-only commands in class. Trying to write random values to such paths has very different effects from editing a report in your home directory.

Read names and permissions from the exact file

Linux commonly uses filesystems that distinguish upper and lower case. A file named Index.html can be separate from index.html. Test in a disposable folder before relying on that property, especially if your Linux environment uses a shared mount from another host. In a website deployment, also check the exact path configured by the application. A typo in case can make a valid upload refer to the wrong name. Listing the directory and copying the observed spelling into the next check helps resolve the problem without changing the site's access policy.

Read a permission error as a question about the identity that made the request. Your terminal account might be able to read a file that the web server's service account cannot reach. In a practice example, look at the owning user and group with ls -l and at your own effective identity with id. The displayed names help you match them. The actual service may use another user with its own groups and applicable paths. If you are testing application access, use evidence from the service or a permitted lab identity, not only the admin’s successful manual read.

A process can be associated with a specific user even when its request came from somewhere else. The web application may accept a customer request and then read its own stylesheet on the server. That local read is normally made using the program's process identity and applicable access control. The remote customer's device is not directly opening a local Linux file in that design. This is a useful distinction when you explain the pathway from a browser to a file to a new student.

Do not let a command name replace the question of who owns the work. If a command can act as an administrator through an approved elevation policy, it can affect more files than an ordinary account. The small read-only checks in this chapter work without elevation. Later, when a lesson asks you to restart or configure a service, verify what that particular permission lets you do. Describe the operation and the intended path so you know where to record the result.

Hand another learner a check they can repeat

One reason cloud teams use shell commands is that a command line can describe exactly what another person should check. An instruction such as “look at the server” has many possible meanings. An instruction to confirm the distribution with cat /etc/os-release and then report the PRETTY_NAME value gives a specific action and result. When you write an exercise, name the machine, the path and the expected value. Leave room for the value to differ when the environment is supposed to differ.

The same precision helps when a team sets up another host. A package manager can install the same supported software on a second system configured with the correct repositories. A configuration can be reviewed before someone changes it. A short script can repeat a series of tested steps. But a terminal command only describes what to ask the system to do. You still choose a supported version, suitable permissions and an outcome to verify. Start automation with one command you understand and one check that catches a wrong result.

Read-only work is an excellent place to practise. Ask two students to use the inventory commands on their own lab machines. Have them exchange the observed distribution, kernel and CPU architecture. Their report can use the same headings even if all three values differ. Ask which facts change the package guidance and which ones identify the machine. This gives a first taste of repeatable operations without requiring scripts that install or remove anything.

For the dairy exercise, your written note might classify the software as Linux, report the distribution the instance booted and identify the type of application it should run. Then it might say which directory you inspected and whether the sample page was present. Avoid writing merely “server ok.” You can specify which claim you checked and what remains open. A classmate should be able to copy the path, verify it belongs to their own test instance, and tell whether their outcome matches.

People can also use a graphical tool when that makes a task clearer. The reason to know the shell is that it tells you how the installed system responds and gives you a compact way to keep the evidence. In a real team the cloud dashboard, deployment system, monitoring interface and terminal can each provide a different observation. The beginner's goal is to understand which one answers the immediate question, then share enough detail for another human to follow.

Compare two images using a real decision

Assume the dairy plans a second training host for a simple static site. One classmate knows Ubuntu and has class instructions written with APT. Another has already studied Amazon Linux 2023 and DNF. Both can use Linux. Decide which option fits the exercise by asking which images the team can maintain, which packages they need and whether the course material uses a particular distribution. For a class, following the documented lab environment makes it easier to understand a difference when a command behaves unexpectedly.

Do not pick a download just because its name contains Linux. Check the distribution version, CPU architecture and dependencies it requires. If the web application uses a library, the package manager can choose a build from the repositories configured for that distribution and architecture. A manual download needs more checking. Find the vendor’s requirements for the binary before trying to execute it. This gives you an explanation for why the same archive might be useful on one image but unsuitable on another.

Keep the life of the server separate from the licensing of its software. Linux and many utilities are distributed under licenses that allow important uses including inspecting source and, subject to the license, modifying or redistributing software. A cloud virtual machine still uses chargeable infrastructure depending on the account, service and options. Some images and support offerings have their own terms. Verify costs and obligations against the actual selected image when planning a real deployment. The read-only comparison and paper exercise below can be done without creating a new EC2 instance.

When one image has a security update and another no longer receives updates, the ability to keep the workload maintained can matter more than a learner’s preferred package command. Note where the distribution documents its supported releases and how your team plans to review changes. You can record that as a requirement without improvising an upgrade during the lab. Installed versions, enabled services, network policies and account permissions all affect a running system. A familiar distribution name is one starting point for understanding its maintenance.

In the course, one habit will save many detours. State which commands are specific to the selected distribution and which apply to the broad task. The task is “install and verify a web server package,” even when the package command changes. The judgment about verifying the process and a request applies after installation on either distribution. Write a small comparison in your own words so you can carry the right idea from one image to another instead of trying random variants of a command.

Make a read-only system inventory

Choose one terminal in a disposable Linux VM or your existing isolated course instance. Record the machine's expected name and tell your trainer which account you will use. Start with the identity and distribution commands above. Then ask the filesystem for a short list of conventional locations. Use the listing form that shows a directory's own entry rather than opening everything beneath it. A mounted directory, a normal directory and a link may all be represented by familiar paths, and your observations help show which one you have.

hostname
whoami
printf 'Home: %s\n' "$HOME"
pwd
ls -ld -- / /etc /var /tmp /proc /dev /usr/bin
sed -n '1,5p' /etc/os-release
ps -p $$ -o pid,ppid,comm

The first two lines help identify the session. Printing the home path and the current directory shows two facts that may agree just after login. If they differ, reconstruct how you reached the current folder. The listing should show the type, owner and mode of the named entries on a typical lab Linux host. Some outputs may have link arrows or may be missing in a minimal environment. Report the difference without trying to create those system locations. The release-file sample describes the visible distribution. No change was needed to observe it.

The last command uses $$, which Bash expands to the current shell's process ID in this simple interactive context. The process listing asks for that ID and reports values such as the parent PID and command name. Open a second interactive shell and compare the IDs and working directories. A new shell can be on the same machine and have the same user while holding a different working directory and PID. Mention this when a friend supplies a terminal screenshot with the same prompt as yours but a different process result.

Write four lines in your lab notebook. Give the hardware architecture and kernel, the distribution and version, the account and home, and one observed conventional system path. Add a fifth line saying which distribution documentation you would look up to choose a package command. The check succeeds if you can explain why each field matters. A missing or empty command result should be described with the actual error and follow-up reasoning. In a minimal image, you may need to choose a tool that is present rather than install something just to fill the report.

For a paper variation, have a classmate give you a hypothetical Mac terminal reading and a remote Linux reading. In each, put a different hostname or kernel name. Ask which one describes the machine that will serve the dairy's page. Write the observations that support your decision. A browser window can display either machine's site and this alone does not tell you where the typing went. The expected result is that the terminal's shell context identifies the command destination, even while a separate browser displays the remote service.

Make a miniature site tree without administrator access

Now practise the filesystem idea without setting up a real web service. Use a unique folder beneath your home directory, with subdirectories named site, settings and logs. These mimic the jobs of an application's content, configuration and evidence folders. They are training files under your ownership. Name the exact lab path in your notes so you can inspect it from a second shell. The command block uses && so a failing setup does not continue into later write operations in the wrong folder.

model=$(mktemp -d "$HOME/dairy-tree.XXXXXXXX") &&
  cd -- "$model" &&
  mkdir -- site settings logs &&
  printf '%s\n' 'Mauli Dairy: dispatch desk opens at 6' > site/index.html &&
  printf '%s\n' 'content_file=site/index.html' > settings/site.conf &&
  printf '%s\n' '09:00 training content prepared' > logs/site.log &&
  printf 'Exercise directory: %s\n' "$model"

Continue only when the printed path belongs to the folder that the lab just made. Each write in this exercise has a different role. The first file is the content a reader expects. The second is a sample setting that names a relative path. It is plain training text and there is no program installed to read it. The last records when the training content was written. Think through how the files would relate if there were a real service. The setting would tell it which content to pick, and the log could record what really happened after a request.

pwd
ls -l -- site settings logs
cat -- settings/site.conf
cat -- site/index.html
cat -- logs/site.log

Read the three cat outputs carefully. The setting mentions the name of the content file; it is separate from the content. The site file contains the opening time, and the log says only that content was prepared. The log does not establish that the page was served to a browser. From here, write a sentence telling a classmate which file to read for each question. The same separation helps you reason about a real web server where the configuration and logs can be managed in different locations.

For a negative case, make a second config file beside site.conf whose content says content_file=site/Index.html. Leave the correct file unchanged. Test the path by listing the exact case written by the second config, then list the folder's real entries. On an ordinary case-sensitive lab filesystem, the uppercase query does not find the lowercase file. If both names resolve in your environment, record the filesystem behavior rather than trying to force it. Compare the missing-name explanation with a separate permission denial from the course. A wrong name and a denied action call for different next steps.

Remove only the exercise’s temporary files after you finish, or keep the folder to compare with the later file-operations lesson. Before cleanup, leave the directory and print your saved path. Confirm the expected prefix and which files you made. A file manager or a sequence of removals for the exact known paths works for this small workspace. Check for unexpected files before removing the parent, and ask about the lab instance's lifecycle separately if your course supplied it. There was no server package or system configuration introduced by the exercise.

Choose a measurement for the layer that might have failed

Imagine the owner gives you one complaint: “the website does not work.” Ask what they saw and when. If the browser never established a connection, a working copy of the page in a folder does not establish network reachability. If the browser received an HTTP error, some component answered with a status, and the next step is to find which one. If the page opens with the wrong time, look at the selected content and request target. A single feeling of failure can point to several distinct observations.

A beginner-friendly sequence follows the available evidence. Check the intended host and account. Locate the application or the exercise files. Use a read-only service or process check only when you know which program you are investigating. Then make a safe test request where the lab permits it. Read the result beside the relevant logs and timestamps. In a team, work from the known facts rather than looking for all possible problems at once. Name one likely layer and choose a check that could prove you wrong before you change anything.

One example is a service supervised by systemd on a supported distribution. Its unit status may indicate that a program is running, and recent log lines may show a configuration error from an earlier attempt. Compare the timestamps. A process can be active now and the old error can still be in its journal. The user's current experience calls for a test of the intended response. If a colleague asks for proof, say which process state and which response you measured. Neither the cloud instance label nor the process state contains the full story alone.

Keep a small decision record. In the training tree, list whether the settings name exists, whether the content path exists with the exact case, and whether the sample evidence describes the intended file. In a real service, add the machine and service identity to the same record. If you find the location is wrong, a permission change may simply hide the original clue without solving it. If the process really needs a permitted file and cannot access it, ask how it should be granted access rather than immediately changing the whole system.

Think about what the check can actually tell you. Seeing a file at site/index.html proves that path exists in your current view. It cannot tell you which content path a service selected without a separate observation. Seeing a package in the installed list says its files were installed, while a process or service check determines whether its running component is present now. A request measures whether the system served your chosen outcome. Use each result at the level it describes and combine them to support a diagnosis.

Learn to tell the story without unsupported absolutes. You can say that Linux is a common choice for server workloads and that this course uses it on its practice machines. Other operating systems and specialized environments serve different workloads. You can say that this distribution uses a documented package manager and that your image has a certain set of tools. You can point to the release file, configured software and process checks. Those facts give the person who follows your lab a much clearer answer than a popularity number or a claim that every server uses one setup.

Interview practice for the first server question

What is the difference between Linux and Ubuntu?

Linux is the kernel that manages resources and provides the operating-system interfaces programs use. Ubuntu is a distribution. It combines a Linux kernel with tools, libraries, repositories and configuration defaults. I would identify the distribution and release before choosing a package command. I would inspect the kernel and architecture if I were choosing a binary or investigating a compatibility issue. Each check answers a different question about the machine.

Your SSH login worked. What does it establish about the website?

It establishes that the connection to the remote shell worked with the account used for the session. I would confirm the hostname and effective user, then separately check the intended web process and make a safe request to the expected path. The website can fail while the login still works, because the session and the application are separate programs and may use different identities and network paths.

How would you explain the purpose of /etc, /var and a home directory to a trainee?

I would show examples around one application. Its host configuration often lives under /etc. Changing data such as logs or runtime state commonly lives under /var. A student's own exercise files belong in a workspace they control, often under home. I would then verify the application's actual paths because installations and settings can choose other places. The map tells us where to start checking.

How do you decide which Linux image to use for an AWS application?

I start with the software and maintenance requirements. I check the architecture, version support, required packages, team experience and any image terms relevant to the workload. In training I follow the course's supported image so I can compare results with its instructions. Once the instance is running, I record what it actually booted and verify the application. This is more useful than choosing based on the image name alone.

A file looks right in your terminal but the service cannot read it. What would you check?

I would read the configured content path and the relevant error. I would check the service's process identity, file owner and permissions on each directory component, then compare the access it needs with what the policy grants. I would repeat the same safe request after any targeted authorized change. The administrator's manual read confirms their access, and the service's test verifies the identity the application actually uses.

Check your understanding

An AWS dashboard shows Running, but the delivery page returns the wrong opening time. Choose the useful next observation: inspect the selected content and web request, assume that Running proves the page was correct, or recreate the entire instance before looking at the result.

Answer and reasoning

Inspect the selected content and request. The instance state describes the virtual machine, while the browser result describes what it served. You can often identify a wrong file or application setting without changing the instance lifecycle.

Two machines print Linux for uname -s. One uses DNF and the other uses APT. Choose the most useful explanation: the machines can run different Linux distributions, all Linux systems must use one package manager, or the one using APT cannot have a Linux kernel.

Answer and reasoning

The machines can run different distributions. The kernel family agrees, while the distribution chooses repositories and package-management tools. Check the release file before using an install command.

You type a path using Index.html and a listing shows only index.html. What should you do first: check the observed spelling and case, make the whole tree writable, or run a system upgrade?

Answer and reasoning

Check the observed spelling and case. Ordinary Linux filesystems often distinguish those names. A change to the spelling is focused and can be verified directly. A permission or software change does not address which name your request used.

What does a log line saying “training content prepared” establish? Choose whether it records a preparation event, proves every browser received the page, or identifies every user's account and groups.

Answer and reasoning

It records that preparation event in the exercise. A served response and the account that made a request require separate observations. A good diagnosis says what one log line establishes and where to get the next clue.

Revision cards

Kernel and distribution

The kernel handles resources and system requests. The distribution supplies the usable software environment, packages and maintenance choices around it.

Terminal and remote shell

The screen can be local even when commands run on a remote machine. Confirm the host and account before modifying any file.

Read the right version

The distribution release helps choose package instructions. The architecture helps choose executable builds. The kernel release describes the running kernel.

Three pieces of a website

Content is served to the visitor. Configuration helps the service choose what to do. Logs report recorded events. Follow one request and identify the evidence from each piece.

Two kinds of success

A running instance and a running service describe infrastructure and process state. A successful test request shows how the intended application responded.

Official references