Linux For Cynics One user's experiences with Linux

25Sep/130

Valve Announcements

SteamOS-logo

New Valve announcement.
Yep, it's SteamBox: http://store.steampowered.com/livingroom/SteamMachines/

But what's interesting is that it's not just a console made by Valve. They say they've got other manufactures ready to make their own machines running SteamOS. Not to mention that they clarified that SteamOS is meant to be run on any PC hardware, not just especially made hardware. Finally:

Can I hack this box? Run another OS? Change the hardware? Install my own software? Use it to build a robot?
Sure.

I'm so glad they get it.

So, to sum up the last two announcements: "We made a Linux distro, we are making hardware companies support Linux, and we are selling Linux boxes"

19Apr/130

Check your Laptop Battery Status from Command Line

The tool used to query laptop battery state is called acpi. In Ubuntu or Debian, install it like so:

$ sudo apt-get install acpi

Let's run it!

$ acpi

The output looks something like this:

Battery 0: Discharging, 99%, 02:34:33 remaining

There are various options for acpi we can use:

Check the temperature:

$ acpi -t

Output:

Thermal 0: ok, 48.0 degrees C
Thermal 1: ok, 48.0 degrees C

To check the AC power status

$ acpi -a 

Output:

AC Adapter 0: off-line

You can check all the status together:

$ acpi -V

Output:

Battery 0: Discharging, 96%, 02:33:55 remaining
Battery 0: design capacity 1773 mAh, last full capacity 1723 mAh = 97%
Adapter 0: off-line
Thermal 0: ok, 48.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 105.0 degrees C
Thermal 0: trip point 1 switches to mode passive at temperature 90.5 degrees C
Thermal 1: ok, 47.0 degrees C
Thermal 1: trip point 0 switches to mode critical at temperature 127.0 degrees C
Cooling 0: LCD 8 of 15
Cooling 1: Processor 0 of 10
Cooling 2: Processor 0 of 10
3Apr/130

Which Architecture

A common question a lot of new users have is, what is an "architecture" and which one does my computer use?

If you really want to know what is meant by computer architecture, then there's always wikipedia to learn from.

In the context of Linux users, I usually hear this question in a couple different scenarios:

Q: I want to install a Linux distribution, which version do I need, 32 or 64 bit?

A: You can't go wrong by installing a 32 bit distribution, because hardware designed to run 64 bit software, can run 32 bit software with no problem. Here's a list of 64bit CPUs. If your CPU is on your list, you might want to use a 64 bit version of your distro instead. A little tip: If you really need to ask this question and the answer confuses you, just go with the 32 bit version.

Q: I already have Linux running on this machine, now I want to know if it's a 32 bit kernel, or a 64 bit kernel.

A: Easy!

uname -m

will give you the architecture of your kernel. i386, i686 are 32 bit, and amd64 is 64 bit!

Q: Okay, how do I find out if my CPU is 32 or 64 bit, regardless of what Linux kernel it's running?

A: There are actually a few ways to do this:

lscpu

displays cpu info, and will tell you the architecture of your CPU and if it can use 64 bit op-mode. This is probably the easiest way.

Another way:

grep lm /proc/cpuinfo

searches for the "lm" string in /proc/cpuinfo/. If it's found, that means the CPU is capable of 64 bit mode. Btw, lm means "long mode".

Tagged as: No Comments