• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

maim Command Examples in Linux

by Deepika

“maim” is a Linux command line utility for taking screenshots. It provides a simple and efficient way to capture screenshots of the entire screen, a specific window, or a selected rectangular area.

Some of the features of maim include:

  • Fast and lightweight: maim uses the imlib2 library to take screenshots, which results in quick and efficient operation.
  • Selective screenshots: users can choose to take screenshots of the entire screen, a specific window, or a selected rectangular area.
  • Image output: maim supports saving the screenshot image in a variety of formats, including PNG, JPEG, and BMP.
  • Command-line interface: maim can be run from the command line, making it suitable for scripting and automation.

Overall, maim is a versatile and efficient tool for taking screenshots on Linux systems. It is well suited for tasks that require quick and easy screenshot capture without the overhead of a full-featured graphical interface.

maim Command Examples

1. Capture a screenshot and save it to the given path:

# maim path/to/screenshot.png

2. Capture a screenshot of the selected region:

# maim --select path/to/screenshot.png

3. Capture a screenshot of the selected region and save it in the clipboard (requires `xclip`):

# maim --select | xclip -selection clipboard -target image/png

4. Capture a screenshot of the current active window (requires `xdotool`):

# maim --window $(xdotool getactivewindow) path/to/screenshot.png

Filed Under: Linux

Some more articles you might also be interested in …

  1. firewall-cmd Command Examples in Linux
  2. einfo: command not found
  3. gofmt Command Examples
  4. gh browse: Open a GitHub repository in the browser or print the URL
  5. macof: command not found
  6. fallocate: command not found
  7. RPM command examples to query, install, remove and upgrade packages
  8. pvdisplay Command Examples in Linux
  9. flashrom: command not found
  10. gow Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright