By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: Running out of memory in Android 16’s Linux Terminal? Try this fix
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > News > Running out of memory in Android 16’s Linux Terminal? Try this fix
News

Running out of memory in Android 16’s Linux Terminal? Try this fix

News Room
Last updated: 2025/05/09 at 7:52 AM
News Room Published 9 May 2025
Share
SHARE

Mishaal Rahman / Android Authority

TL;DR

  • Android 15’s new Linux Terminal app is limited to 4GB of memory, which can be insufficient for developers.
  • A workaround involves increasing the zram size, creating a swap file, and adjusting swappiness to improve memory availability.
  • While not a perfect solution, this method should help reduce crashes due to low memory in the Linux VM.

One of the most exciting new features in the second quarterly release of Android 15 is the Linux Terminal app. This app allows you to run full-fledged Linux applications on Android by booting an instance of the Debian distribution within a virtual machine. This virtual machine shares resources and hardware, such as processing power and storage, with the host Android device. By default, the Linux Terminal app is limited to 4GB of memory, which might be insufficient for demanding development workloads. Fortunately, there’s a simple workaround for this limitation.

Linux VM in Android memory use

Mishaal Rahman / Android Authority

A screenshot showing that only 4GB of memory is available in the Linux VM, even on a Pixel 9 Pro where there’s nearly 10GB of free memory.

Although the Linux Terminal app runs on all Pixel phones with the latest Android 15 stable or Android 16 beta releases, it has a fixed memory allocation regardless of the device’s total RAM—whether 8GB, 12GB, or 16GB. This contrasts with Chromebooks, where the Linux VM can utilize nearly all available memory, reserving only 1GB to ensure Chrome OS continues to operate smoothly. Consequently, Chromebooks can handle significantly more memory-intensive development workloads.

Since a primary motivation for Google developing the Linux Terminal app was to bring more development tools to Android, its 4GB memory cap is disappointing. Although the Terminal app features ‘memory ballooning‘ to dynamically adjust the Linux VM’s memory allocation, this capability only allows its usage to fluctuate between the minimum required for VM operation and the aforementioned 4GB limit. Fortunately, the workaround is simple—though not entirely foolproof—and likely familiar to those acquainted with Linux.

Memory allocated to Linux Terminal in Android

Mishaal Rahman / Android Authority

Snippets from the config VM config file showing that a maximum of 4GB of memory is allocated to the Linux VM

As developer Li Zhao highlighted on his blog, the process involves enlarging the zram size from the default 1GB to 8GB, creating an 8GB swap file on disk, and setting the swappiness to an appropriate value (e.g., 100).

To increase the zram size, edit the zram-generator.conf file in /etc/systemd:

Code

$ cat /etc/systemd/zram-generator.conf
[zram0]
zram-size = 8192
compression-algorithm = zstd

To change the swappiness, edit the sysctl.conf file in /etc:

Code

$ cat /etc/sysctl.conf
....
vm.swappiness=100

To create a new 8GB swap file, run these commands:

Code

$ sudo fallocate -l 8G /swap
$ sudo chmod 600 /swap
$ sudo mkswap /swap
$ sudo swapon /swap
$ sudo swapon -s #update /etc/fstab for defaults mount on boot
$ cat /etc/fstab
...
/swap swap swap defaults 0 0

For those unfamiliar, zram lets you use a portion of RAM as compressed swap space, thereby effectively increasing available memory. The swappiness value, on the other hand, dictates how aggressively the Linux kernel handles memory page swapping. While swapping pages with RAM is faster than using disk storage, this isn’t a foolproof method for significantly boosting memory availability—compression has its limits. Nevertheless, this simple workaround should reduce instances of apps being terminated due to low memory or the Linux Terminal crashing, especially when combined with the additional 8GB of swap space on disk.

Have you experimented with the new Linux Terminal app on your Pixel? If so, what have you done with it so far? Let us know in the comments below!

Got a tip? Talk to us! Email our staff at [email protected]. You can stay anonymous or get credit for the info, it’s your choice.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article Proof of Central Limit Error Scaling for ESPRIT Algorithm | HackerNoon
Next Article The next extension will have more than 800 cards, we tell you everything
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

Does video game monetisation harm children – and what is Australia doing about it?
News
How to Implement Account-based Marketing: 7 Real-Life Examples
Computing
Sony Xperia 1 VII leaks big time ahead of launch event
News
Best Cheap Headphones 2025: The top budget efforts for less than £100
Gadget

You Might also Like

News

Does video game monetisation harm children – and what is Australia doing about it?

11 Min Read
News

Sony Xperia 1 VII leaks big time ahead of launch event

4 Min Read
News

The Week’s Biggest Funding Rounds: Anysphere, Wonder Raise Massive Rounds

7 Min Read
News

Miranda sings about being ‘unhappy’ with ex Blake as he’s sat in front at ACMs

7 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?