LCA ICT Specialism study materials
LCA ICT Specialism study resources

LCA ICT Specialism practice questions

One question at a time. Build your LCA ICT Specialism understanding.

First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1Linux Fundamentals and Command-Line Operations

Which command displays the manual page for the ls command in a Linux system?

  1. help ls
  2. man ls Correct answer.
  3. ls --help --page
  4. info --man ls

Explanation

The man command is the standard interface to the system manual pages, and man ls opens the reference page for ls. The other forms either misuse options or invoke different help mechanisms that do not open the manual page.

Question 2Linux Fundamentals and Command-Line Operations

A file named report.txt has permissions -rw-r----- and is owned by user alice with group staff. Which statement describes what user bob (not in staff) can do?

  1. Read the file because Linux grants read to all other users by default.
  2. Write to the file because group permissions apply to everyone.
  3. Read and write the file because ownership does not affect access.
  4. Neither read nor write, because he falls into the other class with no permissions. Correct answer.

Explanation

Permission bits are evaluated in order: owner, then group, then other. Bob is not the owner and not in staff, so only the other-class bits apply, and those are ---. Therefore he cannot read or write the file.

Question 3Linux Fundamentals and Command-Line Operations

Which command shows the absolute path of the current working directory?

  1. dirname
  2. ls -d
  3. cd
  4. pwd Correct answer.

Explanation

pwd (print working directory) outputs the full absolute path of the current directory. cd changes directory, ls -d lists a directory entry, and dirname strips the last component of a path string.

Question 4Linux Fundamentals and Command-Line Operations

Which wildcard pattern in a shell matches every file whose name ends with .log in the current directory?

  1. ?.log
  2. .log*
  3. [.]log
  4. *.log Correct answer.

Explanation

The asterisk matches any sequence of characters including none, so *.log matches names ending in .log. The question mark matches exactly one character, .log* anchors at the start, and [.]log matches only the literal name .log.

Question 5Linux Fundamentals and Command-Line Operations

Which command appends the text 'done' as a new line to the end of notes.txt without truncating existing content?

  1. echo done < notes.txt
  2. echo done > notes.txt
  3. echo done | notes.txt
  4. echo done >> notes.txt Correct answer.

Explanation

The >> operator opens the file in append mode, so existing content is preserved and the new line is added at the end. The single > operator truncates the file before writing.

Question 6Linux Fundamentals and Command-Line Operations

Which command displays the first 15 lines of a file named access.log?

  1. head -n 15 access.log Correct answer.
  2. head -n -15 access.log
  3. tail access.log
  4. sed 15 access.log

Explanation

head prints the beginning of a file and -n 15 sets the count to 15 lines. tail shows the end, a negative count changes head's behavior to omit trailing lines, and sed with a bare number is not a valid print command.

Question 7Linux Fundamentals and Command-Line Operations

Which command creates an empty file named placeholder.txt if it does not already exist?

  1. mkdir placeholder.txt
  2. touch placeholder.txt Correct answer.
  3. cp placeholder.txt
  4. ln placeholder.txt

Explanation

touch updates timestamps and creates the file when it is absent. mkdir creates a directory, cp requires a source file, and ln requires a target to link to.

Question 8Linux Fundamentals and Command-Line Operations

Which command searches the file /etc/passwd for lines containing the string 'root'?

  1. which root /etc/passwd
  2. locate root /etc/passwd
  3. grep root /etc/passwd Correct answer.
  4. find /etc/passwd root

Explanation

grep reads the named file and prints lines matching the pattern, so the pattern precedes the file operand. find searches directory trees by attributes, locate queries a filename database, and which resolves command paths.

Question 9Linux Fundamentals and Command-Line Operations

A directory listing shows -rwxr-xr-- for a script. What is the octal permission value?

  1. 754 Correct answer.
  2. 764
  3. 755
  4. 744

Explanation

Each triad converts to a digit: rwx is 7, r-x is 5, and r-- is 4, giving 754. Reading the bits in order owner, group, other produces that value directly.

Question 10Linux Fundamentals and Command-Line Operations

Which command displays the process ID of every running process named nginx?

  1. ps aux nginx
  2. jobs nginx
  3. pgrep nginx Correct answer.
  4. pstree nginx

Explanation

pgrep matches process names against a pattern and prints the matching PIDs by default. ps aux lists all processes but does not filter by name alone, pstree shows a tree, and jobs lists shell job records.

Question 11Linux Fundamentals and Command-Line Operations

In a shell script, what does the variable $? contain immediately after a command finishes?

  1. The path of the command that was executed
  2. The number of arguments passed to the script
  3. The process ID of the current shell
  4. The exit status of the most recently executed command Correct answer.

Explanation

$? holds the exit status of the last foreground command, where zero conventionally means success. The shell PID is in $$, the argument count is in $#, and the command path is not stored in a special variable.

Question 12Linux Fundamentals and Command-Line Operations

Which command changes the owner of data.csv to the user deploy while leaving the group unchanged?

  1. chown deploy data.csv Correct answer.
  2. umask deploy data.csv
  3. chmod deploy data.csv
  4. chgrp deploy data.csv

Explanation

chown sets file ownership and, with a single user argument, changes only the owner. chmod alters permission bits, chgrp changes group ownership, and umask sets default permission masks.

Question 13Linux Fundamentals and Command-Line Operations

Which command shows the disk space used by each mounted filesystem in human-readable units?

  1. free -h
  2. lsblk -h
  3. df -h Correct answer.
  4. du -h

Explanation

df reports filesystem-level usage for mounted filesystems, and -h scales the numbers to human-readable units. du summarizes space used by directory trees, lsblk lists block devices, and free reports memory usage.

Question 14Linux Fundamentals and Command-Line Operations

Which command sends the TERM signal to the process with PID 4242?

  1. killall 4242
  2. kill 4242 Correct answer.
  3. kill -9 4242
  4. kill -STOP 4242

Explanation

kill defaults to SIGTERM when no signal is specified, so kill 4242 requests a graceful termination. The -9 option sends SIGKILL, -STOP suspends the process, and killall takes a process name rather than a PID.

Question 15Linux Fundamentals and Command-Line Operations

Which command displays the last 20 lines of system.log and keeps following new lines as they are written?

  1. tail -n 20 -f system.log Correct answer.
  2. less +20 system.log
  3. cat -f system.log
  4. head -n 20 -f system.log

Explanation

tail with -f keeps the file open and prints appended lines, while -n 20 sets the initial count. head cannot follow files, cat has no follow option, and less is an interactive pager that does not stream by default.

Question 16Linux Fundamentals and Command-Line Operations

Which command sorts the lines of names.txt numerically by the second whitespace-separated field?

  1. sort -n -k2 names.txt Correct answer.
  2. sort -u -k2 names.txt
  3. sort -r -k2 names.txt
  4. sort -f -k2 names.txt

Explanation

The -k2 option selects the second field as the sort key, and -n applies numeric comparison to it. The -r flag reverses order, -u removes duplicates, and -f ignores case, none of which provide numeric ordering.

Question 17Linux Fundamentals and Command-Line Operations

Which command finds all regular files under /var/log whose names end in .gz?

  1. ls -R /var/log '*.gz'
  2. find /var/log -type f -name '*.gz' Correct answer.
  3. grep '*.gz' /var/log
  4. locate -type f '*.gz'

Explanation

find walks the directory tree and applies tests, so -type f restricts results to regular files and -name '*.gz' matches the suffix. Quoting the pattern prevents the shell from expanding it before find sees it.

Question 18Linux Fundamentals and Command-Line Operations

Which command compresses archive.tar into archive.tar.gz while removing the original tarball?

  1. gzip -k archive.tar
  2. gzip archive.tar Correct answer.
  3. zip archive.tar
  4. tar -czf archive.tar.gz archive.tar

Explanation

gzip replaces the input file with a compressed .gz version unless -k or -c is used, so the original tarball is removed. The -k flag keeps the original, and the tar and zip forms do not delete the input.

Question 19Linux Fundamentals and Command-Line Operations

A file must be readable and writable by its owner, readable by its group, and inaccessible to all other users. Which command sets exactly those permissions?

  1. chmod 640 file Correct answer.
  2. chmod 644 file
  3. chmod 604 file
  4. chmod 660 file

Explanation

Owner rw- is 6, group r-- is 4, and other --- is 0, giving 640. This grants write access only to the owner and blocks all access for unrelated users.

Question 20Linux Fundamentals and Command-Line Operations

Which command displays the environment variable PATH in the current shell?

  1. set PATH
  2. cat PATH
  3. env PATH
  4. echo $PATH Correct answer.

Explanation

The dollar sign triggers variable expansion, so echo prints the value of PATH. cat treats PATH as a filename, set without arguments lists all variables, and env with a bare name tries to run a command.

Question 21Linux Fundamentals and Command-Line Operations

Which command in a shell script tests whether the file config.ini exists and is a regular file?

  1. if [ -d config.ini ]; then
  2. if [ -x config.ini ]; then
  3. if [ -s config.ini ]; then
  4. if [ -f config.ini ]; then Correct answer.

Explanation

The -f test succeeds only when the path exists and is a regular file. The -d test checks for a directory, -x checks the execute bit, and -s checks for a non-empty file.

Question 22Linux Fundamentals and Command-Line Operations

A pipeline runs as cmd1 | cmd2. Which statement about how the shell connects the two processes is correct?

  1. cmd2 reads cmd1's output from a temporary file that the shell deletes afterwards.
  2. cmd2 starts only after cmd1 has fully finished and flushed its output.
  3. cmd1 and cmd2 share the same stdin file descriptor for data transfer.
  4. cmd2 reads cmd1's stdout through a pipe whose write end closes when cmd1 exits. Correct answer.

Explanation

A pipe is a kernel buffer with a read end and a write end; the shell connects cmd1's stdout to the write end and cmd2's stdin to the read end. When cmd1 exits and closes its end, cmd2 sees end-of-file after draining buffered data.

Question 23Linux Fundamentals and Command-Line Operations

The command chmod 2755 /shared is executed. What effect does the leading 2 have?

  1. It sets the setgid bit so new files inherit the directory's group. Correct answer.
  2. It removes the execute bit from the group and other classes.
  3. It sets the sticky bit so only owners can delete files in the directory.
  4. It sets the setuid bit so the directory runs with root privileges.

Explanation

In a four-digit mode the leading digit carries the special bits, and 2 corresponds to setgid. On a directory, setgid causes newly created entries to inherit the directory's group ownership.

Question 24Linux Fundamentals and Command-Line Operations

A process is stuck in uninterruptible sleep and kill -TERM has no effect. What is the most accurate explanation?

  1. The TERM signal was sent to the wrong process group by the shell.
  2. The process is blocked in a kernel wait and cannot act on signals until it returns. Correct answer.
  3. The process has ignored SIGTERM by installing a handler that blocks it.
  4. The process has reached its nice limit and cannot receive further signals.

Explanation

Uninterruptible sleep (state D) means the task is waiting inside the kernel, typically on I/O, and pending signals are handled only after the wait completes. Even SIGKILL cannot take effect until the kernel path returns.

Question 25Linux Fundamentals and Command-Line Operations

A log file grows continuously and must be searched for lines containing 'ERROR' without loading the whole file into memory. Which approach is most appropriate?

  1. grep 'ERROR' app.log | tail -n 100
  2. cat app.log | grep 'ERROR' | sort -u
  3. tail -f app.log | grep --line-buffered 'ERROR' Correct answer.
  4. grep -c 'ERROR' app.log

Explanation

tail -f streams appended lines, and grep with line buffering emits matches promptly instead of batching them in a block buffer. This keeps memory use bounded regardless of file size.

Question 26Linux Fundamentals and Command-Line Operations

Which command prints the absolute path of the current working directory?

  1. ls -d
  2. cd
  3. dirname
  4. pwd Correct answer.

Explanation

The pwd builtin prints the absolute pathname of the shell's current working directory, resolving any symbolic links unless the -P option is used. It is a shell builtin in bash and also exists as a standalone binary. cd changes the directory rather than reporting it, and dirname strips a trailing component from a path argument.

Question 27Linux Fundamentals and Command-Line Operations

Which command searches the file /etc/hosts for lines that contain the string 'localhost'?

  1. find /etc/hosts -name localhost
  2. cat /etc/hosts | localhost
  3. locate localhost /etc/hosts
  4. grep localhost /etc/hosts Correct answer.

Explanation

grep takes a pattern followed by one or more file operands and prints each matching line, so grep localhost /etc/hosts is the standard way to filter a file's contents. find searches directory trees by name or metadata, not file contents, and locate queries a filename database. Piping into a bare word attempts to execute it as a command.

Question 28Linux Fundamentals and Command-Line Operations

Which command displays the manual page for the tar utility?

  1. man tar Correct answer.
  2. info --manual tar
  3. tar --help-page
  4. help tar

Explanation

man tar invokes the manual pager and opens the reference page for the tar command. The help builtin only documents shell builtins, while tar --help prints a short usage summary to standard output rather than the full manual. There is no --help-page option.

Question 29Linux Fundamentals and Command-Line Operations

Which command prints the number of lines, words, and bytes contained in notes.txt?

  1. du notes.txt
  2. wc notes.txt Correct answer.
  3. stat notes.txt
  4. count notes.txt

Explanation

wc with no options reports newline, word, and byte counts for each file operand, in that order. stat reports inode metadata such as size and timestamps rather than word counts. du reports disk usage of files and directories, and count is not a standard utility.

Question 30Linux Fundamentals and Command-Line Operations

A file currently has mode 644. Which command adds execute permission for the owner while leaving every other permission bit unchanged?

  1. chmod o+x file
  2. chmod 755 file
  3. chmod a+x file
  4. chmod u+x file Correct answer.

Explanation

Symbolic mode u+x modifies only the owner's execute bit, so 644 becomes 744 with group and other bits untouched. Setting 755 would also grant execute and read to group and other, which changes more than requested. The a+x and o+x forms target different permission classes.

Question 31Linux Fundamentals and Command-Line Operations

Which command appends the single line 'rotation complete' to the end of the existing file backup.log?

  1. tee backup.log < 'rotation complete'
  2. echo 'rotation complete' >> backup.log Correct answer.
  3. echo 'rotation complete' | backup.log
  4. echo 'rotation complete' > backup.log

Explanation

The >> operator opens the target in append mode, so the echoed line is added after existing content. The single > operator truncates the file first and would destroy the previous log entries. Piping into a filename or redirecting a string as input is not valid shell syntax.

Question 32Linux Fundamentals and Command-Line Operations

Which command prints only the third colon-separated field of every line in /etc/passwd?

  1. awk -F: '{print $1}' /etc/passwd
  2. cut -d: -f3 /etc/passwd Correct answer.
  3. sed '3d' /etc/passwd
  4. head -n3 /etc/passwd

Explanation

cut with -d sets the field delimiter and -f selects fields by number, so -d: -f3 extracts the third colon-delimited field, which is the UID. The awk program shown prints the first field, while sed '3d' deletes line three and head prints whole lines.

Question 33Linux Fundamentals and Command-Line Operations

Which command line replaces every occurrence of 'eth0' with 'ens3' in net.conf and writes the result to net.new, leaving net.conf untouched?

  1. sed -i 's/eth0/ens3/g' net.conf
  2. sed 's/eth0/ens3/g' net.conf > net.new Correct answer.
  3. grep eth0 net.conf > net.new
  4. sed 's/eth0/ens3/' net.conf | tee net.conf

Explanation

The sed substitution with the g flag replaces all matches per line and prints to standard output, which the redirection captures in net.new while the source file stays intact. The -i option edits the file in place, and tee net.conf would overwrite the original. grep alone does not perform substitution.

Question 34Linux Fundamentals and Command-Line Operations

Which command displays the current user's numeric user ID and group ID?

  1. id Correct answer.
  2. users
  3. whoami
  4. logname

Explanation

id reports the real and effective user and group IDs plus supplementary groups, and with -u or -g it prints just the numeric values. whoami prints only the user name, without any numeric ID. users lists logged-in users and logname prints the login name.

Question 35Linux Fundamentals and Command-Line Operations

Which command displays the ten most recently modified regular files under /srv/data, including files in subdirectories?

  1. ls -lt /srv/data
  2. du -a /srv/data | sort -rn | head
  3. find /srv/data -type f -printf '%T@ %p\n' | sort -rn | head Correct answer.
  4. find /srv/data -maxdepth 1 -type f | head

Explanation

find recurses into subdirectories by default, -type f restricts results to regular files, and -printf emits an epoch timestamp before each path. Sorting numerically in reverse places the newest first, and head keeps ten entries. Plain ls -lt does not descend into subdirectories.

Question 36Linux Fundamentals and Command-Line Operations

Which command line shows only the paths from the output of find /var that are owned by the user www-data?

  1. stat -c '%U' /var
  2. find /var -name www-data
  3. ls -l /var | grep www-data
  4. find /var -user www-data Correct answer.

Explanation

The -user test in find matches files whose owner is the given user, and find recurses through /var by default. The -name test compares base names rather than ownership. Listing /var with ls shows only top-level entries, and stat reports metadata for a single path.

Question 37Linux Fundamentals and Command-Line Operations

Which command displays the ten largest regular files anywhere under /home, sorted from largest to smallest?

  1. du -sh /home
  2. find /home -type f -printf '%s %p\n' | sort -rn | head Correct answer.
  3. find /home -size +10M -print
  4. ls -lS /home

Explanation

find with -printf '%s %p' emits each file's size in bytes followed by its path, and sort -rn orders those lines by numeric size descending so head keeps the ten largest. ls -lS covers only one directory level, and du -sh summarizes a whole tree. The -size test filters by a threshold instead of ranking files.

Question 38Linux Fundamentals and Command-Line Operations

A user runs crontab -e, adds the line 30 2 * * 1-5 /usr/local/bin/report.sh, and saves. What does this schedule do?

  1. It runs report.sh five times each day at 30-minute intervals.
  2. It runs report.sh at 02:30 on the first through fifth day of each month.
  3. It runs report.sh at 02:30 on Monday through Friday. Correct answer.
  4. It runs report.sh every 30 minutes from 02:00 to 05:00 daily.

Explanation

Cron fields are minute, hour, day of month, month, and day of week, so 30 2 means 02:30 and 1-5 in the day-of-week field means Monday through Friday. The asterisks leave day of month and month unrestricted. A hyphen in a cron field denotes an inclusive range, not a step or a count.

Question 39Linux Fundamentals and Command-Line Operations

A script contains the line command1 && command2. Under which condition does the shell run command2?

  1. Only when command1 is still running in the background.
  2. Regardless of the exit status of command1.
  3. Only when command1 exits with status zero. Correct answer.
  4. Only when command1 exits with a non-zero status.

Explanation

The && operator is a short-circuit AND list: the shell executes the right-hand command only if the left-hand command returns exit status zero, which conventionally signals success. A non-zero status skips command2 entirely. Unconditional execution is the job of the ; separator, and background execution uses & instead.

Question 40Linux Fundamentals and Command-Line Operations

A directory has mode 1777 and is owned by root. Which statement describes the effect of the leading 1 on files created inside it?

  1. Every user who creates a file in the directory automatically becomes its owner, overriding normal ownership rules.
  2. New files inherit the directory's group and are made executable by all users.
  3. Only the file's owner or root may delete or rename the file, even though all users may create files. Correct answer.
  4. Only root may create files in the directory; other users may read existing entries.

Explanation

The leading 1 is the sticky bit, which on a world-writable directory such as /tmp prevents users from removing or renaming entries they do not own; root is exempt. The 777 part still allows any user to create files. Ownership of new files is set by the creating process's IDs, and group inheritance comes from the setgid bit, not the sticky bit.

Question 41System and Process Management

In ITIL 4, which practice is primarily responsible for ensuring that users have access to the services they are entitled to use?

  1. Deployment management
  2. Service desk management
  3. Access management Correct answer.
  4. Service level management

Explanation

Access management grants users the right to use a service while restricting access to unauthorized users, matching entitlements defined by the organization. Service level management focuses on agreed targets, and deployment management moves components into live environments, so neither governs entitlement.

Question 42System and Process Management

A service desk classifies every incident by impact and urgency to derive priority. What is the main purpose of this classification?

  1. To calculate the cost of each incident to the business
  2. To record the technical root cause of each incident
  3. To assign each incident to the change advisory board
  4. To determine the sequence in which incidents are resolved Correct answer.

Explanation

Impact and urgency combine to produce a priority that sets the order in which incidents are handled relative to available resources. Root cause belongs to problem management, and cost or change authorization are separate processes.

Question 43System and Process Management

Which statement best describes a known error in service management terms?

  1. A request for a standard change that has been pre-approved
  2. A problem that has been analysed and has a documented root cause and workaround Correct answer.
  3. An incident that has been closed without user confirmation
  4. A change that failed and was backed out

Explanation

A known error exists once a problem has been analysed sufficiently to identify its root cause, and a workaround is typically documented so incidents can be resolved faster. It is not merely a closed incident, a failed change, or a pre-approved request.

Question 44System and Process Management

A change is assessed as high risk, affects multiple services, and requires approval from several stakeholder groups. Which change type does this describe?

  1. Emergency change
  2. Normal change Correct answer.
  3. Service request
  4. Standard change

Explanation

Normal changes are assessed, authorized, and scheduled through the change control process, and higher-risk ones need broader approval. Standard changes are pre-authorized and low risk, emergency changes are fast-tracked, and service requests are routine user requests.

Question 45System and Process Management

What distinguishes a service request from an incident?

  1. A service request is only raised by IT staff
  2. A service request must be approved by the change advisory board
  3. A service request is always caused by a failed component
  4. A service request is a routine user request for something the service offers Correct answer.

Explanation

Service requests are user-initiated requests for standard, pre-defined offerings such as access or information, and they are not failures. Incidents represent an unplanned interruption or degradation of a service.

Question 46System and Process Management

Which document defines the targets and responsibilities agreed between a service provider and a single customer?

  1. Service catalogue
  2. Service level agreement Correct answer.
  3. Configuration management plan
  4. Operational level agreement

Explanation

A service level agreement records the measurable targets and responsibilities agreed with a specific customer. An operational level agreement supports internal delivery, and the service catalogue lists available services rather than agreed targets.

Question 47System and Process Management

In a configuration management database, what is a configuration item?

  1. Any component that needs to be managed in order to deliver a service Correct answer.
  2. Any change that has been rejected by the change authority
  3. Any user who has requested access to a service
  4. Any incident that has breached its resolution target

Explanation

A configuration item is any component under configuration control that must be managed to deliver an IT service, including hardware, software, documentation, and people where relevant. Incidents, rejected changes, and requesters are records, not configuration items.

Question 48System and Process Management

What is the primary role of the service desk within a service value chain?

  1. Defining the organization's service strategy
  2. Capturing demand and acting as the single point of contact for users Correct answer.
  3. Performing root cause analysis on all problems
  4. Authorizing high-risk changes

Explanation

The service desk is the single point of contact between users and the service provider, capturing demand and handling incidents and requests. Change authorization, strategy definition, and root cause analysis sit with other practices.

Question 49System and Process Management

An incident affects a critical payment service and has no available workaround. Following typical priority guidance, how should it be treated?

  1. High priority because impact is high and urgency is high Correct answer.
  2. Medium priority pending a full problem investigation
  3. Deferred until the next scheduled change window
  4. Low priority because no workaround exists

Explanation

Priority rises with both impact and urgency; a critical service with no workaround means severe business impact and pressing need. Absence of a workaround increases urgency rather than lowering priority.

Question 50System and Process Management

A problem record has been raised, but the underlying error cannot yet be identified. What is the most appropriate next step in problem management?

  1. Close the problem because no root cause is known
  2. Log the problem as a service request
  3. Keep the problem open and apply interim containment while analysis continues Correct answer.
  4. Convert the problem into an emergency change immediately

Explanation

Problem management continues analysis while interim measures reduce impact, keeping the record open until a root cause is found or the issue is otherwise resolved. Closing without analysis loses the opportunity to prevent recurrence.