Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In WSL Ubuntu, run Chrome with --headless --screenshot to save a PNG without opening a visible browser. The image is written to the shell’s current directory as screenshot.png. For example:

mkdir -p ~/screenshots
cd ~/screenshots
google-chrome --headless --screenshot --window-size=1280,900 https://example.com

Replace google-chrome with the Chrome-compatible browser command installed in your distribution. Find available commands with command -v google-chrome or command -v chromium. Chrome’s documented generic CLI examples use chrome; executable names vary by package and environment. See the Chrome Headless command-line reference.

Run Headless Chrome and save a screenshot

Chrome Headless runs without a visible browser UI. Its --screenshot flag captures the target page and saves screenshot.png in the process’s current working directory. The viewport can be requested with --window-size=WIDTH,HEIGHT.

  1. Make a Chrome-compatible browser available in Ubuntu. This guide does not prescribe a package installation command because the right installation method and executable name depend on your setup.
  2. Choose where the screenshot should go. In the WSL terminal, use pwd to see the current directory. Chrome writes its default screenshot there.
  3. Check the browser command. Try command -v google-chrome, command -v chromium, or the command appropriate for your installation. Use the executable that is actually present.
  4. Capture the page. Substitute the browser command, target URL, and desired viewport dimensions:
google-chrome --headless --screenshot --window-size=1280,900 https://example.com
  1. Verify the output. Run ls -l screenshot.png in the same directory. If the command reports that the file is missing, check the directory with pwd and review Chrome’s terminal output.

The example uses google-chrome as a common Linux command name; it is not guaranteed to exist on every WSL installation. Chrome documents the screenshot behavior and options in its command-line reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
BenQ GW2790C 27" IPS Computer Montior 1080P FHD 144Hz Game-Ready, Home Office, USB-C, Visual Optimizer, Flicker-Free, Low Blue Light, Ultra Slim Bezel, TUV-Certified, Eye-CareU
  • 【Designed for Comfortable All-Day Productivity】 Enhance your workflow with a 24-inch IPS eye care monitor built for home office, study, and daily tasks, featuring BenQ Eye-Care technologies to reduce eye strain during extended screen time.
  • 【USB-C One-Cable Convenience】 Connect your laptop or MacBook with a single USB-C cable for video, data, and power delivery, reducing cable clutter and simplifying your workspace
  • 【Smooth 144Hz for Better Work Experience】 Enjoy smoother scrolling, reduced motion blur, and more responsive multitasking compared to standard 60Hz monitors—perfect for long work sessions and Gaming!
  • 【Built for Business & Office Deployment】 Designed for corporate offices, remote teams, and large-scale workstation setups. Reliable performance and consistent display quality make it ideal for IT deployment and bulk purchasing
  • 【Energy Efficient & Certified Sustainability】 Reduce energy consumption and lower operating costs—an efficient choice for businesses and users running monitors for extended hours

Choose the screenshot dimensions and timing

Set a viewport size

Add --window-size=WIDTH,HEIGHT to request the page viewport in pixels. For example, --window-size=1280,900 requests a 1280-by-900 viewport. The size affects the page layout Chrome renders; it is not evidence that the screenshot automatically includes every pixel of a taller page. Chrome’s reference also shows --window-size=412,892 as an example, not as a required or recommended device size.

Limit the wait

--timeout=MILLISECONDS sets the maximum wait before capture, even if the page is still loading. A timeout is an upper limit, not a guarantee that all remote data, images, or animations are ready. Use a value suited to the page, and inspect the result if content loads asynchronously.

Fast-forward timer-based page activity

--virtual-time-budget=MILLISECONDS can fast-forward time-dependent page code, such as timer-based updates. It is not a universal replacement for waiting on network requests or for a site-specific readiness condition.

Rank #2
MNN 15.6" FHD 60Hz Portable Monitor USB-C HDMI IPS HDR Gaming Laptop
  • Full HD Portable Monitor - MNN 15.6inch portable laptop monitor with 1920*1080 resolution, advanced IPS glossy screen support 178° full viewing angle, it renders accurate and bright color, draws you into the video or game with lifelike colors and amazing detail.It can effectively reduce blue light radiation damage, no flickering, eye-care, and make it easier to watch for a long time.A second monitor for working from home.
  • Double Type-C Port -For Plug & Play, the MNN monitor provides 2 Full Feature Type-C ports. Only One USB Type-C Cable is required to connect to the power supply & display signal transmission. NOTE: Your device should support thunderbolt 3.0 or USB 3.1 Type C DP ALT-MODE.which supports multiple connect ways to your laptops, PC, Phones, Macbooks, PS5/PS4, Xbox, and Switch.
  • Lightweight Ultra Slim for Travel - As a portable external monitor,MNN portable laptop monitor easily accommodate to every suitcase and backpack and stress-free when you are holding it for a long time. They are truly portable computer monitors for travelers, students, gamers,engineers, and everyone.
  • Give consideration to work and games - through multiple display modes [Copy Mode/Extended Mode/Second Screen Mode/Portrait Mode], we can bring you a clear second screen in the meeting, and expand the screen anytime and anywhere to improve work efficiency and improve the quality of life. Adjusting to HDR mode can upgrade the image to a new level, providing you with brighter highlights,deeper and more realistic colors, more realistic images, and amazing viewing/gaming experience.
  • Powerful Smart Cover - MNN portable external monitor can work in both landscape and portrait mode, can be used as a gaming monitor, screen extender for laptop or phone. Comes with a scratch-proof smart cover made of durable PU leather exterior, doubles as a stand, provides comprehensive protection for this portable computer monitor.

Find the PNG from Windows

Open a Linux directory in File Explorer

From the WSL shell, change to the directory containing the screenshot and run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
explorer.exe .

Alternatively, enter the distribution’s path in File Explorer, for example \wsl.localhostUbuntuhomeusernamescreenshots. Substitute the actual distribution name, Linux username, and directory. Depending on the setup, the distribution may also be reachable through a \wsl$ path. Microsoft documents these WSL file-access methods in its WSL file system guidance.

Save directly to a Windows-mounted directory

Windows drives are mounted under /mnt/ by default in WSL. To put the default PNG in a Windows user’s Pictures folder, for example:

Rank #3
ViewSonic VA2448-MHU 24 Inch 1080p IPS Computer Monitor, 120Hz, USB C
  • Versatile Full HD IPS Display: Elevate your home office or study space with this 24 Inch 1080p (1920 x 1080) LED monitor featuring a smooth 120Hz refresh rate; enjoy an IPS panel that delivers consistent colors and wide viewing angles for clear visuals from any perspective
  • Single-Cable USB-C Connectivity: Simplify your workspace with high-speed data, audio, and video transfer over a single cable; the USB-C port provides efficient passthrough power to keep your laptop charged when using the included power adapter
  • Fluid Variable Refresh Rate: Experience smoother visuals and eliminate screen tearing for everyday tasks and multimedia use; this technology ensures seamless frame rates and reduced stuttering for a more responsive and polished viewing experience
  • Enhanced Viewing Comfort: Minimize eye fatigue during long workdays or study sessions with integrated Flicker-Free technology and a Blue Light Filter; these eye care features provide a more comfortable viewing experience for students and professionals
  • Flexible Connectivity: Seamlessly connect your laptops, PCs, and Macs with versatile input options; this monitor features HDMI, VGA, and USB C inputs, providing the reliable compatibility needed for both modern hardware and legacy devices in any setup
cd /mnt/c/Users/WindowsUser/Pictures
google-chrome --headless --screenshot --window-size=1280,900 https://example.com

Replace WindowsUser with the Windows account folder name. This assumes the default automount configuration; WSL mount settings can differ. Microsoft recommends storing project files on the same operating system as the tools that use them, so keep files in the Linux filesystem for Linux-tool workflows and use a Windows-mounted path when Windows tools need direct access. See Microsoft’s WSL development environment guidance.

Capture a full page when the basic flag is not enough

The documented --screenshot flag captures the target page, but the current Chrome CLI reference does not establish that this alone captures an arbitrarily tall full page. If you need full-page output, use a browser automation workflow that explicitly supports full-page capture, such as Puppeteer’s page screenshot API, and follow its current setup and API documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which Headless Chrome should you use?

Start with current Chrome Headless, invoked with --headless. Chrome describes it as the browser running without a visible UI; the current mode was updated in Chrome 112. The separate old Headless shell is a legacy implementation, and its documentation is marked deprecated. It is not the default choice for this command-line screenshot workflow. See Chrome Headless mode and the old Headless documentation.

Rank #4
Sale
BenQ GW2490C 23.8" IPS Computer Montior 1080P FHD 144Hz Game-Ready, Home Office, USB-C, Visual Optimizer, Flicker-Free, Low Blue Light, Ultra Slim Bezel, TUV-Certified, Eye-CareU
  • 【Designed for Comfortable All-Day Productivity】 Enhance your workflow with a 24-inch IPS eye care monitor built for home office, study, and daily tasks, featuring BenQ Eye-Care technologies to reduce eye strain during extended screen time.
  • 【USB-C One-Cable Convenience】 Connect your laptop or MacBook with a single USB-C cable for video, data, reducing cable clutter and simplifying your workspace
  • 【Smooth 144Hz for Better Work Experience】 Enjoy smoother scrolling, reduced motion blur, and more responsive multitasking compared to standard 60Hz monitors—perfect for long work sessions and Gaming!
  • 【Built for Business & Office Deployment】 Designed for corporate offices, remote teams, and large-scale workstation setups. Reliable performance and consistent display quality make it ideal for IT deployment and bulk purchasing
  • 【Energy Efficient & Certified Sustainability】 Reduce energy consumption and lower operating costs—an efficient choice for businesses and users running monitors for extended hours
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

  • google-chrome: command not found: The command name does not match the installed executable, or a compatible browser is not available in Ubuntu. Check with command -v google-chrome and command -v chromium; use the command that exists.
  • You cannot find screenshot.png: The default destination is the current working directory, not necessarily your home directory. Run pwd, then ls -l screenshot.png. Change to the intended directory before launching Chrome.
  • The screenshot looks incomplete: A maximum wait does not ensure that site data or animations have finished. Try an appropriate --timeout or a virtual-time budget for timer-driven content, but verify the page’s readiness needs rather than assuming either option waits for every network request.
  • The image is not a full-page capture: Do not assume the basic CLI screenshot flag captures an arbitrarily tall page. Use an automation workflow with an explicit full-page screenshot option.
  • File Explorer cannot find the WSL file: Open the current directory with explorer.exe ., or check the exact distribution and Linux username in the \wsl.localhost path. If saving under /mnt/c, confirm that the Windows drive is mounted there in your WSL configuration.

Or skip the browser setup

ScreenshotNeo provides a screenshot API and MCP server for developers. One GET request returns an image or PDF; its API and options are documented at ScreenshotNeo documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server includes take_screenshot, get_page_info, and capture_pdf for AI agents using Claude, Cursor, or another MCP client. The Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.

Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Does Headless Chrome open a browser window in WSL?

No. Current Chrome Headless runs without a visible UI.

Can I save the screenshot straight to my Windows Pictures folder?

Yes. Change to the corresponding mounted path under /mnt/c/ before running Chrome, provided your WSL automount configuration exposes the drive there.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.