Q. How do I check the size of PAGESIZE under Linux?
A. Most modern operating systems have their main memory divided into pages. It allows better utilization of memory. A page is a fixed length block of main memory, that is contiguous in both physical memory addressing and virtual memory addressing. Kernel swap and allocates memory using pages
To display size of a page in bytes, enter:
$ getconf PAGESIZE
OR
$ getconf PAGE_SIZE
Output:
4096
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- My 10 UNIX Command Line Mistakes
- Linux: 20 Iptables Examples For New SysAdmins

- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Facebook it - Tweet it - Print it -


{ 8 comments… read them below or add one }
Can’t tell you how long I spent searching for this information. I knew it was simple and obvious, but I couldn’t remember it, so I could look it up! So many sites skip the command to get your page size. Points to you for having the info up and easy to parse.
Thanks. Nice info!
Thanks for the sharp tip.
Is there a way to change the page size?
Guess you have to change the kernel source.
In /usr/src/linux/include/asm-generic/page.h you can find the following lines:
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
is this MB or KB or GB??
bytes
I think it’s the base-2 logarithm of the page size. In other words, 2^PAGE_SHIFT is the page size. 2^12=4096, the usual page size in bytes