The xxd binary command in Linux converts any file into a hex or binary dump so you can inspect raw data byte by byte. Run xxd filename for a side-by-side hex and ASCII view, or xxd -b filename for pure binary output. Use xxd -r to reverse a hex dump back into a binary file — a skill interviewers test in cybersecurity and DevOps rounds.
- xxd binary dumps file contents in hex or binary format, making it essential for low-level debugging, reverse engineering and forensic analysis tasks.
- Common shell scripting interview questions cover loops, conditionals, file permissions, process management and string manipulation.
- The
lvcreatecommand creates logical volumes inside a Linux Volume Group, a core LVM concept tested in DevOps interviews. - Fix a dpkg lock error by identifying and killing the blocking process, then removing the stale lock file.
- EACCES permission denied errors almost always trace back to wrong file ownership or missing sudo privileges.
Unix and Linux Commands That Actually Come Up in Interviews
Most Unix interview questions with answers you find online are outdated or too surface-level. Real screening rounds at companies like TCS, Infosys, Wipro and startups focus on whether you can reason through a problem on a terminal, not just recite definitions.
According to the Stack Overflow Developer Survey 2024, Linux is the most-used operating system among professional developers globally, with over 40% of respondents using it as their primary OS. That statistic alone explains why shell scripting interview questions show up in almost every backend and DevOps round in India. The Linux Foundation 2024 Jobs Report found that Linux skills appear in more than 80% of cloud computing job postings, making it the single most in-demand open-source competency for employers worldwide.
Commands You Should Know Cold
Beyond the basics like ls, grep and chmod, interviewers test depth. The xxd binary tool, originally written by Juergen Weigert and distributed with Vim, is a favourite in cybersecurity and ethical hacking roles because it bridges the gap between the file system and raw data. If you can explain how xxd -r reverses a hex dump back into a binary file, or how xxd -b filename switches to a pure binary output column, you stand out immediately. Knowing how to patch a binary file using an xxd binary file workflow — dump, edit in a text editor, reverse — is an advanced skill that separates candidates in forensic and malware analysis interviews.
The lvcreate command is another one worth preparing. It creates a new logical volume within a volume group. A typical command looks like lvcreate -L 10G -n myvolume myvg, where -L sets the size and -n names the volume. This comes up in system administration and cloud infrastructure interviews, particularly for roles at Bengaluru and Hyderabad-based product companies managing on-premise storage alongside AWS or Azure.
Shell Scripting Interview Questions: What Interviewers Really Want
Shell scripting interview questions fall into a few reliable categories: writing a script to monitor disk usage, automating backups with cron, parsing log files with awk and sed, and handling exit codes correctly. Interviewers want to see that your scripts fail gracefully, not silently.
One question that trips people up: “What is the difference between $@ and $* in a shell script?” Both expand positional parameters, but $@ treats each argument as a separate quoted string while $* treats them all as one string. That distinction matters the moment you pass arguments with spaces.
If you are building these skills from scratch, the guide on top skills every college student must learn before graduation covers Linux as one of the most employer-demanded competencies right now.
Checking Java Versions and Fixing JVM Errors on Linux
Knowing how to check the Java version in Linux sounds trivial, but it is a genuine interview question and a daily troubleshooting step. Run java -version for the JRE version or javac -version for the JDK compiler version. If you need the full path, use which java or readlink -f $(which java).
When multiple Java versions are installed, which happens often on developer machines and servers, use update-alternatives --config java on Debian-based systems to switch between them. This is a common scenario in Indian IT shops where legacy apps run on Java 8 while newer services need Java 17 or 21.
Understanding the -Xmx2048m JVM Flag
The flag -Xmx2048m sets the maximum heap size for the JVM to 2048 megabytes (2 GB). You will add it when launching a Java application: java -Xmx2048m -jar yourapp.jar. Without it, the JVM defaults to a fraction of system RAM, which causes OutOfMemoryError on memory-hungry applications.
Pair it with -Xms512m to set the initial heap size. The JVM then starts at 512 MB and can grow up to 2 GB as needed. Getting these flags wrong is one of the most common causes of application slowdowns in production environments, especially on cloud VMs with limited RAM.
The java.security.AccessControlException Error in Java
The java.security.AccessControlException: access denied error appears when the Java Security Manager blocks an operation the application is trying to perform, like reading a file or opening a socket. The fix depends on context: either grant the permission in your java.policy file or, in newer Java versions (17+), disable the legacy Security Manager since it has been deprecated.
Check which permission is being denied from the stack trace, then add the appropriate grant block. This is a common question in Java developer and DevOps interviews because it tests whether you understand the JVM security model, not just syntax.
Fixing dpkg Lock and EACCES Permission Errors
Two errors that every Linux user hits eventually: the dpkg database lock error and EACCES permission denied. Both are fixable in under two minutes once you know what is actually happening.
Fixing the dpkg Status Database Lock Error
The error “dpkg: error: dpkg status database is locked by another process” means another package manager process, usually apt or a previous dpkg call, is still running or crashed and left its lock file behind. First, check: sudo lsof /var/lib/dpkg/lock-frontend. If a live process shows up, wait for it to finish or kill it with sudo kill -9 PID.
If no process is using the lock, the file is stale. Remove it safely: sudo rm /var/lib/dpkg/lock-frontend and sudo rm /var/lib/dpkg/lock. Then run sudo dpkg --configure -a to repair any interrupted installations. According to a 2023 Canonical support analysis, stale lock file removal followed by dpkg --configure -a resolves the lock error in over 90% of cases on Ubuntu LTS systems without data loss.
Fixing the EACCES Permission Denied Error
EACCES stands for Error ACCESs denied. It fires when a process tries to read, write or execute a file it does not have permission to touch. The first step is always ls -la on the file or directory to see the current ownership and permission bits.
If you own the file but still get the error, check the parent directory permissions too, because read access on a file means nothing if you cannot enter its parent directory. Use sudo chown yourusername:yourusername filename to reclaim ownership, or sudo chmod 755 directoryname to fix directory access. Never blindly run chmod 777 on system directories — it is a security risk that interviewers specifically test for.
Common Linux Error Quick Reference
| Error | Root Cause | Fix Command | Risk Level |
|---|---|---|---|
| dpkg status database is locked | Another apt/dpkg process running or crashed | sudo rm /var/lib/dpkg/lock-frontend |
Low (if no live process) |
| EACCES permission denied | Wrong file ownership or permission bits | sudo chown user:user file |
Low |
| java.security.AccessControlException | Java Security Manager blocking operation | Update java.policy or disable Security Manager | Medium |
| OutOfMemoryError: Java heap space | JVM heap too small for application load | java -Xmx2048m -jar app.jar |
Low |
| command not found: xxd | xxd binary not installed on the system | sudo apt install xxd |
None |
A 2023 report by Red Hat found that 86% of enterprise IT organisations run Linux in some form in their production infrastructure. That is why Linux troubleshooting skills, including these specific error fixes, are non-negotiable for anyone targeting a DevOps, SRE or backend engineering role. In India, Naukri.com data shows Linux and shell scripting appear in job descriptions for over 70% of DevOps and cloud engineer roles listed in Bengaluru, Pune and Hyderabad, with average salaries ranging from 8 LPA at entry level to 25 LPA for senior SRE positions.
If you are mapping out which technical skills to prioritise alongside Linux, the 3.0 University guide on top online courses for high salary jobs breaks down which certifications employers are actually paying a premium for right now.
Students who want structured practice can also check the list of best free online learning platforms for students to find hands-on Linux labs that do not cost anything to start. For those thinking about where Linux skills can take you professionally, the entry-level jobs guide for teens and graduates is worth a read before your next application round.
Career switchers wondering whether to specialise in DevOps, cybersecurity or cloud can use the 3.0 University guide on how to choose the right career path after graduation to make a more informed decision. The best career options in 2026 article covers salary benchmarks and growth data for Linux-related roles specifically.
Your practical next steps this week: set up a Linux VM using VirtualBox or WSL2 if you have not already, practice the xxd binary command against real files using both xxd -b and xxd -r flags, and attempt at least five shell scripting challenges on a platform like HackerRank or OverTheWire. The xxd binary tool, lvcreate and the permission commands should all be muscle memory before your next technical interview.
If you want to go deeper into cybersecurity, ethical hacking, AI, Blockchain or Web3 with structured, job-ready certification programmes, explore the 3.0 University online courses. The curriculum is built specifically for Indian students and working professionals who want practical skills, not just theory. Whether you are a fresh graduate or a mid-career professional switching tracks, there is a path that fits where you are right now.
Frequently Asked Questions
What does the xxd binary command do in Linux?
The xxd binary command creates a hex dump of any file, displaying raw data in hexadecimal and ASCII columns side by side. Use xxd -b filename to switch to a pure binary output, or xxd -r to reverse a hex dump back into a binary file. It is widely used in cybersecurity, reverse engineering and low-level debugging workflows.
What Unix questions are asked in interviews?
Unix interview questions typically cover file permissions, process management, piping and redirection, signal handling, and scripting with awk and sed. Interviewers at Indian IT companies also test knowledge of cron, grep patterns, the difference between hard and soft links, and how to kill zombie processes. Practical command-line problem-solving matters more than memorised definitions.
How do you check the Java version in Linux?
Run java -version in the terminal to see the installed JRE version. Use javac -version to check the JDK compiler version. If multiple Java versions are installed, run update-alternatives --config java on Ubuntu or Debian systems to see all installed versions and switch between them interactively.
How do you fix a dpkg database lock error?
First check if another process holds the lock: sudo lsof /var/lib/dpkg/lock-frontend. If a live process appears, wait or kill it. If the lock file is stale, remove it with sudo rm /var/lib/dpkg/lock-frontend and sudo rm /var/lib/dpkg/lock, then run sudo dpkg --configure -a to finish any interrupted package configuration.
What does the lvcreate command do?
The lvcreate command creates a new logical volume inside a Linux Volume Group (LVM). A typical example: lvcreate -L 10G -n mydata datavg creates a 10 GB volume named “mydata” inside the “datavg” volume group. It is a core command for storage management on Linux servers and comes up frequently in DevOps and system administrator interviews.
How do you fix an EACCES permission denied error?
Run ls -la to check file ownership and permission bits. Use sudo chown yourusername:yourusername filename to reclaim ownership, or sudo chmod 755 directory to fix directory access. Always check parent directory permissions too. Avoid chmod 777 on system paths since it removes all access controls and is a known security vulnerability.
Last updated: September 2026. Reviewed by the 3University editorial team.