Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Does linux have any system command to display processor type and RAM available in a system. Or do we need to write a script to print this system information.
I think you will find all the info you need in /proc (ex: cat /proc/cpuinfo. << it won't work on every distro, I guess). There has to be a command to find that out, but I can't remember... hmmm
Last edited by Mega Man X; 02-02-2007 at 12:40 AM.
I am trying to print my system information. But when i use file_get_contents("/proc/cpuinfo"), it is displaying a error message as it is read-protected. How can i read contents of this read protected file.
Check the permissions on /proc/cpuinfo. It should be world readable, but may vary from distro to distro.
Also, if you're trying to do a file open on it, you should be aware that everything in /proc isn't really a file. It's a dynamic tree of what appear used as an interface to the kernel and for various data about your running system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.