Linux orientation
Recognize the terminal and Bash shell, read a command, get help, identify the Linux environment, and check whether a command succeeded.
Explanation
Why an RTL or DV engineer uses Linux
Linux is the working environment around most semiconductor tools. You use it to organize RTL and testbench files, configure tool paths, compile a design, run simulations, inspect logs, start regressions, and preserve results. You do not need to become a system administrator before doing this work. You need to understand the command line and verify what each command did.
Terminal, shell, and kernel
These names describe different parts of the environment:
| Term | Plain-language meaning |
|---|---|
| Terminal | The window where you type commands and read results. |
| Shell | The program that reads your command and starts other programs. This course uses Bash. |
| Kernel | The core of Linux that manages processes, memory, devices, and filesystems. |
| Distribution | Linux plus packaged tools and system configuration. The reference for this course is CentOS Stream 10. |
When a terminal shows a prompt such as $, type the command after the prompt. Do not type the $ character shown in documentation.
How to read a command
A command normally has a command name followed by options and arguments:
command option argument
ls -l rtl/
lsis the program to run.-lrequests a detailed listing.rtl/is the directory on whichlsshould operate.
Spaces separate these parts. Quotes keep a path containing spaces together as one argument.
Input, output, errors, and status
Every command can use three standard streams:
| Stream | Number | Purpose |
|---|---|---|
| Standard input | 0 | Data supplied to the command. |
| Standard output | 1 | Normal command results. |
| Standard error | 2 | Warnings and error messages. |
After a command finishes, Bash stores its exit status in $?. Status 0 normally means success. A nonzero value means the command reported a condition or failure that must be checked.
Getting help
| Need | Command | Example |
|---|---|---|
| Full manual | man command |
man ls |
| Short option list | command --help |
find --help |
| Bash built-in help | help command |
help cd |
| Find the command that will run | type command |
type python3 |
Find an executable through PATH |
command -v command |
command -v iverilog |
cd is a Bash built-in, so help cd is more useful than looking for a separate executable. A missing optional tool is a valid finding; do not install software or use sudo unless the lab explicitly authorizes it.
Worked example
Run the following read-only checks:
cat /etc/os-release
uname -r
printf 'shell=%s\n' "$SHELL"
type printf
command -v bash
printf '%s\n' 'Linux setup check complete'
printf 'last-status=%s\n' "$?"
What to look for:
cat /etc/os-releaseidentifies the distribution.uname -rprints the running kernel release.$SHELLshows the configured login shell.type printfexplains how the current shell resolvesprintf.command -v bashprints the Bash executable path.- The final status should be
0because the precedingprintfsucceeded.
Now observe a controlled failure:
ls /path-that-does-not-exist
printf 'ls-status=%s\n' "$?"
ls writes a diagnostic and returns a nonzero status. Capture $? immediately because the next command replaces it.
EDA connection
Use the same check before running a simulator:
command -v iverilog
printf 'lookup-status=%s\n' "$?"
If the tool is unavailable, report that result. Do not invent a successful run or download an unapproved binary.
Common mistakes
- Typing the documentation prompt character as part of the command.
- Copying a command without checking its arguments and current directory.
- Assuming that visible output means success without checking the exit status.
- Using
sudoto hide a path, permission, or installation problem. - Mixing Bash syntax with examples written for C shell or another shell.
Check yourself
What does $? contain? Why must you read it immediately after the command you want to check?
Practice: Linux orientation
Record the distribution, kernel release, configured shell, Bash path, and exit status from one successful command and one deliberately missing path. Do not use sudo.
Practice work is non-certified and is not stored by ASIC Campus.