Category Archives: Linux

Phone and laptop encryption guide: Protect your stuff and yourself

How to encrypt local storage on your Google, Microsoft, and Apple devices.

The worst thing about having a phone or laptop stolen isn’t necessarily the loss of the physical object itself, though there’s no question that that part sucks. It’s the amount of damage control you have to do afterward. Calling your phone company to get SIMs deactivated, changing all of your account passwords, and maybe even canceling credit cards are all good ideas, and they’re just the tip of the iceberg.

Using strong PINs or passwords and various Find My Phone features is a good place to start if you’d like to limit the amount of cleanup you need to do, but in this day and age it’s a good idea to encrypt your device’s local storage if at all possible. Full-disk or full-device encryption (that is, encrypting everything on your drive, rather than a specific folder or user profile) isn’t yet a default feature across the board, but most of the major desktop and mobile OSes support it in some fashion. In case you’ve never considered it before, here’s what you need to know.

Why encrypt?

Even if you normally protect your user account with a decent password, that doesn’t truly protect your data if someone decides to swipe your device. For many computers, the drive can simply be removed and plugged into another system, or the computer can be booted from an external drive and the data can be copied to that drive. Android phones and tablets can be booted into recovery mode and many of the files on the user partition can be accessed with freely available debug tools. And even if you totally wipe your drive, disk recovery software may still be able to read old files.

Encrypting your local storage makes all of that much more difficult, if not impossible. Anyone trying to access your data will need a key to actually mount the drive or read anything off of it, and if you wipe the drive the leftover data that can be read by that file recovery software will still be encrypted even if the new data on the drive isn’t.

There are a few downsides. If you yourself lose the key or if your drive becomes corrupted, for example, it might be more difficult or impossible to recover data. It can slow down performance, especially for devices with processors that don’t provide hardware acceleration for encrypting and decrypting data. But, by and large, the benefits outweigh the drawbacks, and the slowdown for modern devices should be tolerable-to-unnoticeable.

iOS: Don’t worry about it

As of iOS 8, as long as you set a passcode, your personal data gets encrypted. Apple’s security whitepaper (PDF) for iOS 8.3 and later specifically says that “key system apps, such as Messages, Mail, Calendar, Contacts, Photos, and Health data values use Data Protection by default, and third-party apps installed on iOS 7 or later receive this protection automatically.”

The company also claims that every current iDevice features “a dedicated AES 256 crypto engine built into the DMA path between the flash storage and main system memory,” which ought to limit the impact of this encryption on system speed.

OS X: FileVault

Starting with OS X 10.7 (Lion) in 2011, Apple began supporting full-disk encryption with FileVault 2. In more recent OS X versions, some Macs even offer to encrypt your storage as part of the first-boot setup process, though it’s not the default as it is in iOS.

To encrypt your drive after the fact, go to the Security & Privacy pane in System Preferences, and select the FileVault tab. Click Turn On FileVault and you’ll be offered a pair of options: store the key used to unlock your disk somewhere yourself, or choose to store it in your iCloud account. A local recovery key keeps that key off of another company’s servers, but leaves you without recourse if you lose it and you’re locked out of your system. If you do store your key in iCloud (or even if you don’t, for that matter), we strongly recommend enabling two-factor authentication for your Apple ID.

Encrypting your disk doesn’t drastically change the way that OS X works—you just need to put your account password in to unlock the disk before the operating system boots instead of afterward. You’ll also need to specify which local users’ logins can decrypt the disk. Otherwise, just the account that enabled FileVault will be able to turn the machine on. If you ever need to decrypt your Mac, it’s pretty easy if you can log in to the computer or if you have the key available.

Generally speaking, performance for encrypted devices declines less for newer Macs with hardware acceleration—most Core i5s and i7s can do it, but Core 2 Duo Macs cannot.


Despite past promises, new Android devices still aren’t being encrypted by default. Default encryption is an option for OEMs, but outside of Google’s Nexus devices few if any companies are choosing to enable the feature on their phones.

You can still encrypt any relatively modern version of Android pretty easily—these specific steps work for Nexus devices or anything running near-stock Android, but the process should be similar if your phone is using a skin.

Open the Settings app, go to Security, and then tap “encrypt phone” to get the process started. Your phone may ask you to plug it in or charge the battery to a specific level before it will give you the option to encrypt, mostly because interrupting this process at any point is likely to completely corrupt your data partition. You’ll need to protect your phone with some kind of PIN or pattern or password if you haven’t already, and as in OS X your phone will probably require it before the operating system will boot.

To confirm that your phone was encrypted, go to Settings and then Security and look for a small “Encrypted” badge under the “Encrypt phone” menu item. If your phone already says it’s encrypted, you may have one of the new post-Lollipop phones that came with encryption enabled out of the box.

Depending on your phone, encrypting your Android phone or tablet can significantly impact performance. This is the worst for older or slower devices, which can use slower flash memory and filesystems and lack hardware encryption acceleration. The experience is better on newer phones with 64-bit ARMv8 processors and higher-end, faster storage.

Additionally, if you need to decrypt the device later on, there’s no way to do it without wiping and resetting the phone. If your phone came encrypted out of the box, though, there’s no way to decrypt the device without making more extensive software modifications.

Finally, in Android Marshmallow, the Android phones that include external storage are able to encrypt and protect the data on those cards as well as on internal storage.

Chrome OS: Also don’t worry about it

Chromebooks and boxes are pretty locked down out of the box by default, and that extends to encryption of the local storage. As described in the Chromium design documents, ChromeOS uses the eCryptfs filesystem and each user directory is protected by a separate encryption key. Unless you’ve turned on Developer Mode, you don’t have anything to worry about.


The wide variety of Linux distributions available means that it’s difficult to recommend one tool or script or set of directions that will encrypt your drive.

If you’re running a recent Ubuntu or Ubuntu-based distribution, at least, the OS will offer to encrypt your data when you install it. All you need to do is tick a box. And for anything else, you can always take a look at that list of third-party disk encryption software.

Windows Phone 8.1

Windows Phone 8.1 is odd; it supports encryption, but only when some kind of device management server has told it to encrypt itself. There’s no option for end users to encrypt their own devices on demand.

User-initiated BitLocker encryption should be possible in Windows Phone 10, an update that at least most of the current Windows Phone 8.1 devices should be able to get.


Windows is a complex operating system that runs on what is by far the widest range of hardware of any operating system here, so encryption is more complicated. We’ll be focusing on the built-in tools included in modern versions of Windows, but if they don’t work for you there are lots and lots of other third-party drive encryption programs you can look into.

There’s a very small chance that the Windows system you’re using is already encrypted by default, at least if you have the right combination of hardware and software. That goes for users of Windows 8.1, and Windows 10 computers who sign into their systems with Microsoft or Active Directory accounts and whose hardware meets the following requirements:

  • Support for the Secure Boot
  • A Trusted Platform Module (TPM). The feature requires TPM 2.0, and most current devices use TPM 1.2.
  • Hardware and firmware support for Windows’ InstantGo (formerly Connected Standby) feature. InstantGo allows a sleeping system to wake up periodically and refresh certain data, like e-mail messages or calendar events. Your smartphone already does the same sort of thing.
  • InstantGo comes with its own set of hardware requirements, including a solid-state boot volume, NDIS 6.30 support for all network interfaces, and memory soldered to the motherboard. The system must also rely on passive cooling when in Connected Standby mode, even if it normally uses a fan.

This encryption method is also used by the handful of Windows RT systems that made it out the door.

The benefit of this method is that it’s automated and it’s available with every edition of Windows, including the Home editions. The bad news is that those hardware requirements are pretty stringent and there’s no way to just add them to a computer you’ve already bought. And the Microsoft account requirement may rankle if you have no desire to use one.

If you want encryption and don’t meet those requirements, your next best bet is BitLocker. It’s got less-stringent hardware requirements, though it works best if your computer includes a TPM. It also needs one of the higher-end versions of Windows. In Windows 10, users of the Pro, Enterprise, and Education editions can all use it. Windows 8.x provides it with the Pro and Enterprise editions, while Windows 7 and Windows Vista require either the Ultimate or Enterprise editions. Home and Bing editions of Windows are universally excluded, as are pre-Vista versions of Windows.

To enable BitLocker on any version of Windows that supports it, head to the desktop version of the Control Panel and click BitLocker Drive Encryption. If you have a TPM, you ought to be able to save your encryption recovery key to an external drive or your Microsoft account, click through all the screens, and come out on the other side with an encrypted laptop. You can choose to encrypt just the used space on the disk (leaving the free space unencrypted), or you can encrypt the full drive.

Many business-class laptops from the last decade or so and some more recent high-end Ultrabooks tend to include TPMs, though it’s never been a key part of Windows’ system requirements. They generally have their own entries in the Device Manager, if you don’t know whether your computer has one.

If you don’t have a TPM, you’re not out of luck, but there are extra steps. By default, BitLocker won’t work without one, but there are several other options available once you flip a switch. The steps:

  • Go to the Start menu search box or use the Windows+R hotkey combo and type in gpedit.msc. This is a local policy editor that works a lot like the group policy editor used in large businesses, the settings just apply to one computer instead of many.
  • Go to Computer Configuration, then Administrative Templates, then Windows Components, then BitLocker Drive Encryption.
  • Select the Operating System Drives folder.
  • Double-click Require additional authentication at startup.
  • Click the “enabled” bubble, and then check the “Allow BitLocker without a compatible TPM” option below.
  • Click OK.

Now head to the Control Panel and open up BitLocker Drive Encryption. From here, you can either use a USB key that will need to be plugged into your computer to unlock the drive every time it boots. Or you can come up with a special password, separate from your account password, that you type at boot to unlock the disk. Backup keys can be saved to an external drive, your Microsoft account, or to some other file on another local or network disk.


Find the Wi-Fi Password for Your Current Network with the Command Line

If you’ve connected to a Wi-Fi network, your computer usually saves that password so you don’t have to enter it in every time. But sometimes you forget that password. To figure out what it is, Digital Inspiration points out that all you need to do is enter in a simple command in the command line.


Revealing a Wi-Fi password is a little different on both Windows and Mac. On Windows, you need to open up a command prompt in administrator mode. Then enter this command, substituting “labnol” for your Wi-Fi network name:

netsh wlan show profile name=labnol key=clear

On Mac, open up Terminal, and enter in this command, substituting “labnol” for your Wi-Fi network name:

security find-generic-password -ga labnol | grep password

That’s it, you’ll now know the password for the network you’re on.

How to Get the Password of WiFi Network You Are Connected To | Digital Inspiration


Find the Perfect Linux-Compatible PC with Ubuntu’s Hardware Database


Some PCs are more difficult to run Linux on than others—it’s all about the drivers. Some laptops are available with Linux pre-installed, but plenty aren’t—even though they may make great Linux PCs. The Ubuntu Certified Hardware database helps you find Linux-compatible PCs.

Most computers can run Linux, but some are much easier than others. Certain hardware manufacturers (whether it’s Wi-Fi cards, video cards, or other buttons on your laptop) are more Linux-friendly than others, which means installing drivers and getting things to work will be less of a hassle.


Linux veterans probably know about this already, but I’ve had a few people ask me how to find Linux-friendly laptops lately, and my answer is always the Ubuntu Certified Hardware Database. Even if you aren’t running Ubuntu, it’ll tell you which laptops and desktops from Dell, HP, Lenovo, and others are most Linux-friendly. If you’re looking for a Linux-compatible PC, this is a great place to start. If it isn’t in that database, though, be sure to Google around—there may be forum threads dedicated to getting your laptop of choice set up with Linux.

Ubuntu Desktop Certified Hardware | Ubuntu via MakeUseOf