What is a Linux device? (Wi-Fi, Google, /dev)
Saw a Linux device in your Google account or router app? It may be your own phone or tablet. Here is how to check, and what a device means in /dev.
What is a Linux device?
A Linux device is any device whose software identifies itself as Linux. That includes every Android phone and tablet, a Raspberry Pi, a Linux PC, and many other gadgets that run a Linux kernel inside. On a server the same words mean something else: a file under /dev that stands for a piece of hardware.
So the label alone does not tell you much. What it means depends on where you saw it. Find the place where you saw it below, and read that section.
Android counts because of its kernel. The Android documentation says it plainly: "The Android kernel is based on an upstream Linux Long Term Supported (LTS) kernel." A Raspberry Pi counts too, since Raspberry Pi OS is based on the Debian Linux distribution. Linux ends up inside so many products because companies may build on it, and whether Linux is free to use explains the terms in more detail. For who controls the name and the code, see who owns Linux.
Why does Google show a Linux device on my account?
Google's help pages do not explain how a device gets the label "Linux". The explanation below comes from how browsers identify themselves and from user reports. Treat it as the likely cause, not as a rule Google has published.
Every browser sends a user agent string to each site it visits. The string names the browser and the system it runs on. Here is the example MDN gives for Chrome on Android, with the Chrome version number replaced by a placeholder:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<version> Mobile Safari/537.36The word Linux is already there, next to Android. Desktop Chrome on a Linux PC sends a different platform part, with no Android token at all:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36Now think about "desktop site" mode on a phone or tablet. That mode asks sites for their desktop version, so the browser tries not to look like a phone. On Android Stack Exchange, users report that Samsung Internet in desktop site mode sends a user agent that starts with X11; Linux x86_64, the same platform part as a Linux PC. A site that reads that string sees desktop Linux. Firefox for Android is different: MDN documents its user agent with an Android token and no Linux token. Neither Google nor Samsung documents what the device list shows in these cases, so the reports are the best evidence available.
Two more details from Google's help page matter here. The list shows devices that are signed in now or were signed in during the last few weeks. The time shown is the last time the device talked to Google's systems, which can be later than the last time you used it. Google also says that several sessions with the same device type may be one device or several devices.
Check the device and act on it
- Go to your Google Account and open Security & sign-in.
- On the Your devices panel, select Manage all devices. Some older Google help pages call this button Manage devices.
- Check the time and location shown for each device. Compare them with when and where you used your own phones, tablets and computers.
- Tap a device you do not recognise, then tap Sign out.
- Change your password: Security & sign-in, then How you sign in to Google, then Password.
- Under How you sign in to Google, select Turn on 2-Step Verification.
Before you sign a device out, ask yourself two questions. Do you own an Android tablet? Do you ever use desktop site mode in your phone's browser? If either answer is yes, the entry may be yours. If you cannot match the time and location to anything you did, treat it as a stranger and finish every step.
Google's page for a hacked account also points to Recent security events, then Review security events, for sign-in activity you did not cause. Select No, it wasn't me there for anything unfamiliar. If you got a Google security alert, it shows the device type, plus the time and location. When that is not you, select No, secure account and follow the steps.
Why does my router or Wi-Fi app show a Linux device?
Your router keeps a list of the clients on your network. How it picks a label such as "Linux" depends on the router vendor, and vendors rarely document it. Your router's manual is the place to look for its rule.
What matters more is how many devices can honestly carry the label. Every Android phone and tablet uses a Linux kernel, and so does a Raspberry Pi. A list entry that says "Linux" is therefore a weak clue. Do not panic over the name. Match the address instead.
Match the MAC address to a device
A MAC (media access control) address is the address a device uses on your local network. Your router's client list shows one for each device. To find the owner of the "Linux" entry, open the Wi-Fi network details on each device you own and read the MAC address shown there. When one matches the router's list, you have your answer. The menu names differ by phone maker and by router, so check your own device's network settings and your router's manual.
Your own Android phone is a common answer. If you are working on that phone's network settings anyway, see how to set up AdGuard DNS on Android.
Why private MAC addresses make the match harder
Android phones and Apple devices can hide their hardware address on Wi-Fi. Android's documentation says that on Android 10 and higher, the system uses a randomized MAC address by default. You can turn this on or off for each network in the Network details screen in Settings. On Android 10 and 11, the random address is persistent for each network. The reason for the feature is privacy: Android's documentation notes that the factory MAC address is globally unique and static, so it lets the device be tracked. Phone makers can change this behaviour, so check your own phone's Wi-Fi network details.
Apple calls the feature Private Wi-Fi Address. Off uses the hardware MAC address. Fixed uses a private address that does not rotate. Rotating uses a private address that changes every 2 weeks.
This changes how you match. Compare the router's list with the address shown in that network's details on the phone. Do not use the hardware address printed on the box or shown on an About screen, because the phone may never send it on your network. With a rotating address, your own phone can also turn up later as a new, unknown entry.
What to do if it really is a stranger
If no device you own matches, change the Wi-Fi password in your router's settings. Devices that do not know the new password can no longer join. Then reconnect your own devices one at a time, and watch the client list again.
While you are in the router's security settings, pick WPA3 if the router offers it. The Wi-Fi Alliance says WPA3 is mandatory for Wi-Fi CERTIFIED devices, and that WPA3-Personal gives users increased protection from password guessing attempts. That helps if the stranger got in by guessing a weak password.
What is a device in Linux itself? (/dev)
On a Linux system, a device is a file. The hier(7) manual page describes /dev as the home of "special or device files, which refer to physical devices". A program opens one of these files to talk to the device behind it.
There are two kinds. The inode(7) manual page lists the file types S_IFBLK (block device) and S_IFCHR (character device). The kernel's own Linux Device List, the official registry of device numbers, labels every entry as one or the other. For example, major number 1 is listed as 1 char Memory devices and also as 1 block RAM disk. /dev/null is a character device with major 1 and minor 3. /dev/sda is a block device with major 8: the first SCSI disk.
In practice, block devices are where storage lives, such as disks and their partitions. Character devices cover the other kinds, such as /dev/null. If you want the longer story of where this design came from, read how Unix grew into Linux.
See device files with ls -l
ls -l /dev/null
ls -l /dev | head -n 20The first character of each line is the file type. The GNU coreutils manual lists b for a block special file and c for a character special file. For these files the size column is replaced by the major and minor numbers, separated by a comma. The line for /dev/null should look like this, with your own date and time:
crw-rw-rw- 1 root root 1, 3 Nov 15 08:00 /dev/nullThe c says character device. The 1, 3 is the major and minor number from the kernel's registry. Lines that start with b are block devices.
List block devices with lsblk
lsblk
lsblk --output NAME,TYPE,SIZE,MOUNTPOINTThe lsblk(8) manual says it lists information about all available block devices, and by default prints all of them except RAM disks, in a tree. The manual also warns that its output columns can change, so a script should always name its columns with --output, like the second command. Your VPS may name its disk differently from sda, so read the names from this output instead of guessing. When you later attach extra storage, this is the command that shows the new disk, as in adding a block storage volume to a VPS.
FAQ
Is a Linux device on my Google account a hacker?
Not always. Many devices use a Linux kernel, including every Android phone and tablet, and users report that a browser in desktop site mode can look like a Linux PC. Open your Google Account, go to Security & sign-in, then select Manage all devices on the Your devices panel. If the time and location match nothing you did, sign that device out and change your password. Then turn on 2-Step Verification.
Why does my Android tablet show up as Linux in Google?
Google does not document how it labels devices. Chrome on Android already puts the word Linux in its user agent next to Android. Users also report that Samsung Internet in desktop site mode sends a user agent that looks like desktop Linux. If the time and location of the entry match your tablet, it is most likely yours.
How do I find which device on my Wi-Fi is the Linux one?
Compare MAC addresses. Read the address in your router's client list, then open the Wi-Fi network details on each device you own and look for the same address. Phones often use a private address for each network, so compare with the address shown for your network, not the hardware address. If nothing matches, change the Wi-Fi password and choose WPA3 if your router offers it.
What is the difference between a character device and a block device in Linux?
Both are files under /dev that stand for hardware. Block devices hold storage, such as disks and partitions, and lsblk lists them. Character devices are the other kind, such as /dev/null. In ls -l output a block device line starts with b and a character device line starts with c, and the size column shows the major and minor device numbers instead.