Mastering Terminal Commands:

Essential Skills for QA Engineers and SDETs on Mac and Linux

Navigating the command line is a crucial skill for QA Engineers and Software Development Engineers in Test (SDETs) who need to perform tasks efficiently in tech environments, particularly those using Mac and Linux systems.

Understanding basic terminal commands can significantly enhance your productivity, streamline testing processes, and provide powerful tools for debugging and automation.

This guide offers an easy-to-follow introduction to the most commonly used terminal commands, helping QA professionals and SDETs harness the full potential of their system’s command line interface.

Why Learn Terminal Commands?
For QA Engineers and SDETs, the command line interface (CLI) is more than just a tool—it's a gateway to advanced system management and test automation. Mastery of terminal commands allows you to quickly navigate through system directories, manage files, execute scripts, and monitor system resources, all of which are essential for effective testing and debugging.

Basic Terminal Commands for QA Engineers and SDETs on Mac and Linux

qa vs developer
1. `pwd` (Print Working Directory)
   - Ensures you are in the correct directory before running tests or scripts, an essential check in automation scripts.

2. `ls` (List Directory Contents)
   - Quickly verify test files, logs, and configuration files in your current directory.

3. `ls -l` (Long Listing Format)
   - View detailed file permissions and timestamps, crucial for setting up and verifying test environments.

4. `ls -la` (List All Files, Including Hidden)
   - Access hidden configuration files or directories often used in software settings and environment configurations.

5. `cd [directory]` (Change Directory)
   - Navigate to different project directories swiftly, a common task during software testing phases.

6. `mkdir [directory]` (Make Directory)
   - Create new directories for test cases or new projects, organizing your workspace effectively.

7. `touch [filename]` (Create an Empty File)
   - Quickly create or update log files and scripts without opening an editor, streamlining the setup for test automation.

8. `rm [filename]` (Remove File), `rm -r [directory]` (Remove Directory Recursively)
   - Clean up test environments by removing old files and directories, ensuring clean slate testing.

9. `cp [source] [destination]` (Copy Files or Directories)
   - Duplicate configuration files or scripts across multiple test environments without manual input.

10. `mv [source] [destination]` (Move or Rename Files or Directories)
   - Organize or reorganize test files and directories efficiently, especially useful in large projects.

 Advanced Commands for System Monitoring and Networking

11. `ping [hostname]`
   - Check network connectivity to test servers or APIs, a standard procedure in network-related test scenarios.

12. `top`
   - Monitor the performance impact of applications under test, identifying resource-intensive processes during testing.


Let’s dive deep into the commands

terminal commands for QA Engineers and SDET

Fundamental Commands for File and Directory Management


  • `pwd`: Print the current working directory path.
  • `ls`: List all files and directories in the current directory.
  • `ls -l`: Display a detailed list of contents, including permissions, ownership, and timestamps.
  • `ls -la`: Show detailed listings, including hidden files.
  • `cd`: Change the directory to another location in the file system.
  • `cd ..`: Move up one directory level in the hierarchy.
  • `mkdir`: Create a new directory.
  • `mkdir test`: Create multiple directories at once (Note: this appears to be an error as directories should not have file extensions unless specific).
  • `rm -r [directory]`: Recursively removes a directory and its contents.
File Creation and Handling

  • `touch filename`: Create a new empty file or update the timestamp of an existing file.
  • `touch filename filename`: Create multiple empty files simultaneously.
  • `cp [source] [destination]`: Copy files or directories from one location to another.
  • `cp -r`: Recursively copy entire directories.
  • `mv filePath moveToDirectory`: Move or rename files or directories.
  • `rm filename`: Remove a specific file.

Editing and Viewing Files

  • `vim`: Open the Vim text editor to create or edit files.
  • `echo "text"`: Print text to the terminal.
  • `echo "text" > test.txt`: Write or append text to a file.
  • `nano filename.txt`: Use the Nano text editor for editing files.
  • `vim newFile.txt`: Create and edit a new file with Vim.
  • `cat filename`: Concatenate and display the content of files.
  • `head [file]`: Display the first 10 lines of a file.
  • `head -n [number] [file]`: Show a specific number of lines from the beginning of a file.
  • `tail [file]`: Show the last 10 lines of a file.

System Monitoring and Advanced Operations

  • `clear`: Clear the terminal screen for a clean view.
  • `cmp`: Compare two files byte by byte.
  • `diff`: Show differences between two files.
  • `cat test.txt | sort`: Sort the contents of a file alphabetically.
  • `grep 'product' robots.txt`: Search for the word 'product' in a file.
  • `grep -v 'product' robots.txt`: Display lines that do not match the search term.
  • `whoami`: Display the current logged in user.
  • `man vim`: Show the manual page for the Vim command.
  • `whatis cat`: Display a brief description of the 'cat' command.
  • `whereis cat`: Locate the binary, source, and manual files for the 'cat' command.
  • `brew install nvm`: Install a package using Homebrew on Mac.
  • `curl -O https://www.digitalocean.com/robots.txt`: Download a file from the internet.
  • `zip filename.zip filename.txt`: Create a zip archive of files.
  • `unzip filename.zip`: Extract files from a zip archive.
  • `ipconfig getifaddr en0`: Get the IP address of a specific network interface on Mac.
  • `ping codemify.com`: Check network connectivity to a specific domain.
  • `ping -c 5 codemify.com`: Ping a domain a specified number of times.
  • `vm_stat`: Display virtual memory statistics.
  • `free`: Show memory usage on Linux.
  • `top`: Display real-time system processes.
  • `top | grep zoom`: Filter process list to show only those containing the keyword.
  • `kill [pid]`: Terminate a process by its process ID.
  • `ssh [email protected]`: Securely connect to a remote server using SSH.

These terminal commands are integral to the daily toolkit for QA Engineers and SDETs working in Unix-based environments. By becoming proficient with these commands, you not only improve your testing efficiency but also enhance your ability to diagnose and resolve issues rapidly. Practice integrating these commands into your daily tasks to become more comfortable and effective in using the command line for a wide range of QA and testing activities.



Schedule a FREE 30-minute consultation with Sergii to discuss your testing career and job opportunities.
Limited slots are available!
We help ambitious people to get into Tech with no prior experience.