All posts by arcanecode

VeraCrypt on the Command Line for macOS

Introduction

Automation is the key to success, especially in the DevOps world. In addition, security is an ever increasing need in today’s world of hacks and ransomware.

In my last two posts I showed how to use the encryption utility, VeraCrypt, to create encrypted containers and drives to securely store data. In this, and the next two posts, we’ll see how we can automate VeraCrypt from the command line.

We’ll cover the basics. Creating a container, mounting a container (aka volume), getting a list of mounted volumes, and finally dismounting your volumes.

As it turns out, the command line syntax is a bit different for all the major operating systems. In this post we’ll focus on macOS, in the next two posts we’ll cover Windows and Linux.

Prerequisites

Naturally, you’ll have to have VeraCrypt installed. You can find out more in my first post of the series, VeraCrypt – A Powerful Encryption Utility.

The next requirement applies to macOS. In order for macOS to be able to read the variety of filesystems VeraCrypt supports, you need to install a free utility, macFUSE.

It’s free, fast to install and takes very little in the way of system resources. It’s compatible with macOS BigSur and Catalina, and probably older versions too, check their site if you have that need.

Code Samples

While I will be providing samples here, you should also check out the project I have on GitHub that goes with this post, VeraCrypt-CommandLine-Examples.

I’ll update it over time as needed, and it may be easier for you to download, or cut and paste from it.

OK, let’s get started!

Creating a Container

First off, let’s look at the long line of code needed to create a container. Please note that while your blog reader may wrap the command below, it should be one line in your shell script.

/Applications/VeraCrypt.app/contents/MacOS/VeraCrypt --text --create "/Users/arcanecode/Documents/temp/vctest.vc" --size "200M" --password MySuperSecurePassword1! --volume-type normal --encryption AES --hash sha-512 --filesystem exfat --pim 0 --keyfiles "" --random-source /Users/arcanecode/Documents/temp/randomdata.txt

OK, that’s a bit hard to read, so let me break it out into each part below.

The first item is the path to the VeraCrypt application, assuming you installed it in the default location.

/Applications/VeraCrypt.app/contents/MacOS/VeraCrypt

The --text parameter says we want to use VeraCrypt in text mode, not GUI. Note, the –text parameter must be the FIRST parameter you pass in, or it will not work.

--text

We next tell VeraCrypt we want to create a new file container, and where it is to be stored at. For this demo, I’ve created a temp folder in my Documents directory.

You’ll want to change this to the location where you store your volumes. In addition, you’ll also want to change the user folder from arcanecode to your username.

--create "/Users/arcanecode/Documents/temp/vctest.vc"

Next we indicate how big we want our container to be. If you just list a number, VeraCrypt assumes you mean bytes, but you can also affix M for megabytes, G gigabytes, K kilobytes, and so on.

Here I’m going to keep it small for demo purposes and use 200 megabytes.

--size "200M"

Now we provide our password. Normally you would not want to hard code it, but rather pass it into your script as a parameter.

I wanted to keep this demo simple though, and focus on VeraCrypt so I’ve just hard coded it I’m using the same “super secure” password I’ve used in my last few posts.

--password MySuperSecurePassword1!

Next is the volume type, normal or hidden. My previous blog post talks about hidden types, and if you are going to do a hidden volume I would suggest using the GUI in order to assure it is done right.

For this demo we’ll go with a normal volume

--volume-type normal

Now we pick the encryption type. There are quite a few, so refer to the VeraCrypt documentation for a full list. Here we’re using AES.

--encryption AES

Next up, for the encryption method we picked it needs to know the hashing algorithm. For AES I suggest SHA-512.

--hash sha-512

In order to keep this container portable across other OS’s (Windows and Linux) we’ll format using exfat. Be aware though that to use exfat on a Mac, you’ll have to install macFUSE (see the prerequisites section above.)

--filesystem exfat

The PIM is a special number that allows you to specify the number of times hashing algorithm executes. It’s a bit more complex than that, if you want full details see the VeraCrypt documentation.

For now, we can pass it the value of 0 (zero), which tells it to use the default value for the PIM.

--pim 0

You can mount a volume in VeraCrypt using a keyfile, as opposed to a password. We’ve not done that here, so we’ll just pass in an empty string to indicate we won’t use a keyfile.

--keyfiles ""

As a final parameter, you need to provide random data for VeraCrypt to use when generating its hashes. It needs at least 320 characters, but you can give more.

I’ve provided a sample one as part of this demo (see the GitHub code samples), I just randomly smacked keys on my keyboard with my eyes closed. I’d suggest creating one of your own for production, but for just testing and learning (I’m assuming you’ll throw away the vault when you are done) then the one here will be OK.

--random-source /Users/arcanecode/Documents/temp/randomdata.txt

OK, that’s everything you need to create a volume. Now that it’s created, let’s mount it.

Mounting a VeraCrypt Volume

Here is the full command line to mount. (As before, it should be on a single line, ignore any wrapping done by your browser).

/Applications/VeraCrypt.app/contents/MacOS/VeraCrypt --text --mount "/Users/arcanecode/Documents/temp/vctest.vc" /Volumes/vctest --password MySuperSecurePassword1! --pim 0 --keyfiles "" --protect-hidden no --slot 1 --verbose

Let’s start breaking it down. First, as before, is the full path to the VeraCrypt app.

/Applications/VeraCrypt.app/contents/MacOS/VeraCrypt

As with all of these commands, the --text parameter must come first to let VeraCrypt know we want to use text mode and not the GUI

--text

The mount parameter actually has two values that need to be passed in.

First we pass in the name of the file to mount.

Second we need to provide a mount point. This will let macOS treat it like any other drive you might plug in.

In macOS, use /Volumes then add on a name. For simplicity I usually use the name of the file (without any extension), but it doesn’t have to be.

In reality though, it doesn’t make a real difference as macOS overrides the name you provide, and instead uses “Untitled”, “Untitled 2”, and so on.

--mount "/Users/arcanecode/Documents/temp/vctest.vc" /Volumes/vctest

Next is our “super secure” password. If your password has spaces, you’ll need to wrap this in double quote marks.

--password MySuperSecurePassword1!

If you overrode the default PIM when creating your volume, you’ll need to provide it. Otherwise, we can pass it the value of 0 (zero), which tells it to use the default value

--pim 0

If you created your volume using a keyfile or files, provide them here. Otherwise, you can just pass in an empty string to indicate no keyfile is needed.

--keyfiles ""

If this volume contained a hidden volume, you would need to let VeraCrypt know by using a value of yes, plus some other parameters.

In this case there is no hidden partition in our volume, so we can just give a value of no.

--protect-hidden no

OPTIONAL!
Slot is an optional parameter. If you look at the VeraCrypt GUI in macOS, down the left side are a series of slot numbers. If you omit this parameter, VeraCrypt will mount in the first empty slot.

However you can specify a slot, which can be useful if you want to make sure certain volumes always mount in a specific slot. You can then use the slot number when you want to dismount your volumes.

--slot 1

OPTIONAL!
Verbose is also an optional parameter, but I often include it just to see what is going on under the covers. You can use it with any of the commands in this post, I just included it on this one for example purposes.

If you intend to make this into a script then I would suggest omitting it once your script is debugged and working.

--verbose

OK, hopefully all is going well, and you’ve created and mounted your volume. Let’s next see how to get a list, from the command line, of all your mounted volumes.

Listing Mounted Volumes

Here’s the command line to see what is mounted on your Mac.

/Applications/VeraCrypt.app/contents/MacOS/VeraCrypt --text --list

As with other commands you have seen, we start with the full path to the VeraCrypt application. We then use --text to let VeraCrypt know not to use the GUI.

We finish with --list, which tells VeraCrypt to display a list of all mounted containers. This will include the slot number, volume name, and mount directory.

Mom always taught me to put away my toys when I was done playing with them, so in the next section we’ll see how to unmount your volumes once you are done with them.

Dismounting VeraCrypt Volumes

There are four ways to dismount a volume. Three of them will dismount a specific volume, the final will dismount all volumes.

All ways follow the same pattern. Give the path to the VeraCrypt app, followed by the --text parameter to tell VeraCrypt not to launch the GUI.

Finally we give the --dismount to let VeraCrypt know we want to unload our volume. The value passed into the –dismount parameter varies, and will be explained below.

Method 1: Slot Number

/Applications/VeraCrypt.app/contents/MacOS/VeraCrypt --text --dismount --slot 1

With the first method, you provide the slot number. If you mounted a volume and used the slot number parameter, for example your personal file vault is always in slot 5, then this can be an easy way to dismount.

On the other hand, if you let VeraCrypt load in the first available slot, you’ll either have to look at the GUI, or run the list command in the previous section, to learn the slot number.

Method 2: Volume Name

/Applications/VeraCrypt.app/contents/MacOS/VeraCrypt --text --dismount "/Volumes/Untitled"

Using the volume list command or looking at the “Mount Directory” column in the GUI, you can pass in that value to unmount. Because this is typically “Untitled”, “Untitled 1” and so on, it can be of an issue trying to be reliable in unmounting the right volume.

Method 3: Volume File Name

/Applications/VeraCrypt.app/contents/MacOS/VeraCrypt --text --dismount "/Users/arcanecode/Documents/temp/vctest.vc"

This method is the most reliable. Since you know the name of the file you mounted, you can just provide the same file name to unmount.

VeraCrypt doesn’t care what slot it is loaded into, it uses the file name to find it.

The winner – Method 3!

For the reasons above, I highly suggest Method 3 be your go to method for dismounting volumes in your scripts. It is the most reliable, and easiest to understand when looking at the scripts.

But wait, there’s more!

Dismounting ALL Volumes

There is one final method, you can dismount all of the VeraCrypt volumes you have mounted.

/Applications/VeraCrypt.app/contents/MacOS/VeraCrypt --text --dismount

If you use just the --dismount parameter, and pass in no values, then VeraCrypt will attempt to dismount ALL volumes you have loaded.

This can be a useful command to run when you’re shutting down your Mac, to ensure all volumes are properly shutdown.

If you don’t have any volumes mounted, then VeraCrypt basically shrugs it’s shoulders, does nothing, and ends.

Conclusion

In this post, we learned how to create, mount, and dismount VeraCrypt volumes from the command line in macOS. In addition, we also saw how to get a listing of volumes currently mounted.

In the next two posts we’ll see how to do the same things, but in Windows, then Linux.

Creating and Using Hidden Containers in VeraCrypt

Introduction

In my previous post I explained the fundamentals of the powerful encryption tool, VeraCrypt. If you are not familiar with VeraCrypt, I’d suggest going back and reading it first so that this post will make some sense.

In this post I’ll cover how to use VeraCrypt’s hidden containers feature, explaining what it is for then seeing step by step screen shots on how to set it up and use it.

What Are Hidden Containers For?

Let’s say you have a Bitcoin wallet with a sizable amount of money. You travel a lot, and are concerned with someone tampering with your data.

Often times a countries border agents will want to search your computer. I’m not casting aspersions on anyone’s honesty, but you never know.

Now you could setup a standard VeraCrypt container, but what if a tech savvy person noticed it? They could demand you give up your password to the vault. At some point you would wind up giving in, giving access to data you didn’t want shared (your Bitcoin wallet). This is where hidden containers come into play.

VeraCrypt allows you to create a container inside a container. Into what VeraCrypt refers to as the “outer” container, you can place information that looks important, but in reality isn’t.

You can then create the inner or “hidden” container, giving it a different password. To anyone who inspects the outer container, there is no way to tell it contains a hidden container.

In the above scenario, you simply give up, after some fake complaining of course, the password to the outer container. You interrogator will have no way to tell there’s more in there.

When you want to get to the hidden area, you mount it using the password to your hidden container. Let’s see how to setup a hidden container, then how to use it.

Setting up a Hidden Container

Let’s start by opening VeraCrypt.

Begin the process by clicking the Create Volume button.

For this demo I’ll use an encrypted file container, but these steps will also work when you encrypt a non-system partition/drive, as we did in my previous post using a USB thumb drive.

I’m going to take the default of the encrypted file container and click the Next button.

Now we begin creating a hidden container by changing the option to Hidden VeraCrypt Volume and clicking Next.

Now we begin specifying how we’ll be creating our container. In Normal Mode it assumes we have no container. This is the most common method, and what we’ll use here.

In Direct Mode, VeraCrypt will let us add a hidden container to an already existing container. The steps are similar, although since a container already exists it will skip over the next few screens picking up where we start configuring the hidden container.

For this demo we’ll keep the default of Normal Mode and click Next.

Now we need to specify where to store the new file container. Here I just typed in C:\Temp\DemoHidden.hc and clicked Next.

Now we begin the process of configuring the Outer volume. Just click Next to proceed.

Here we’ll select the encryption method. These were discussed in the previous post, so for this demo I’ll just take the default of AES and click Next.

Now we need to specify how big to make the entire container. This will need to be big enough to hold the data we want to put in our hidden container, as well as the space to put our “fake” data we are willing to give up.

For this demo I’m making it a small 250 megabytes, just to go quickly, but you can make this any size you need.

Now we’ll enter the password for the outer container. Follow the same rules for password generation you normally would. Also keep in mind the outer and (when you create it in just a moment) hidden passwords will need to be different.

I’ve checked on the Display Password box so you can see it, and am using the same MySuperSecurePassword1! password I used in the previous post. Once the password is entered, click Next.

Now you jiggle the mouse around to generate some random data VeraCrypt can use to create the real encryption key. Keep going until the bar at the bottom goes green all the way across. Once it does, you can click Format.

When formatting is complete, VeraCrypt is ready for you to copy your fake data into it. Click on the Open Outer Volume button and a file manager for your operating system will open.

Here in Windows it’s the Windows File Explorer, on macOS it will be Finder, and on Linux it will be the file manager for your particular distro.

Once it has opened, copy some fake files you’ve prepared to put in here. Remember this should be data that looks realistic, but isn’t.

One idea might be an Excel Spreadsheet with a family budget, only with fake numbers. Another might be a text file with some realistic looking but fake credit card numbers. Again, data that looks real but isn’t so if someone takes it you won’t be hurt financially or otherwise.

For this demo I’m simply using the same pic I currently (at the time of this writing) use on my Twitter account so you can easily see what is in the outer container.

Be aware this isn’t your only chance, at the end of this post I’ll show how to open the outer container again so you can add, remove or update files in it.

Once done, close the file explorer, return to VeraCrypt and click Next.

Now VeraCrypt lets you know it’s time for configure the hidden volume. Simply click Next to proceed.

You are now asked what encryption method to use on the hidden volume. It is indeed possible to use a different encryption method for the hidden area than you did on the outer container. Doing so isn’t a bad idea, as it can make it more difficult for an advanced hacker to break in.

For this demo I’ll stick to AES, but feel free to pick something different if you wish, then click Next.

Next you need to let VeraCrypt know how much space you want to reserve for the hidden container.

VeraCrypt examines what you have in the outer area, then lets you know how much of the free space you can use for the hidden area. Typically you don’t want to max it out, so you can go update the outer area from time to time.

Here I’m going to use half of my space for the hidden area, in this case 125 megabytes. I enter that, then click Next.

It’s time to enter a password for your hidden volume. Please note, the password for the hidden volume must be different than the outer volume!

Here I will use MySuperSecurePassword2! for illustration purposes, changing the number 1 used in the outer volume to a 2. In real life this would be very easy for someone to guess, so be sure to pick a password that is wildly different from the outer one.

Next we need to format the hidden area. As usual, jiggle the mouse around until the green bar is all the way across the bottom and click Format.

When formatting is complete you are presented with the above informational message. In short, it says if you open the outer volume without taking precautions (which I’ll show in a moment) you can accidentally overwrite the hidden partition.

Simply click OK to dismiss the message.

OK, you are all done with the creation. Simply click Exit to leave the wizard.

Now let’s see how to use the hidden container.

Accessing A Hidden Container

Accessing a hidden container is no different than accessing a regular container that doesn’t have a hidden one. Simply enter the path to the file (or select the device, such as a thumb drive), pick an unused drive letter, and click Mount.

Enter the hidden volumes password, as I did here using the MySuperSecurePassword2!, and click OK.

You can now open the drive letter (in this example W:) in your file explorer and copy files into your hidden container. Here I’ve copied in a photo I took of the historic Boll Weevil Monument from my old home town of Enterprise AL.

Note that this is the only picture here. The photo I use for Twitter doesn’t appear, as it is part of the outer volume.

When you are done, you can close your file explorer, return to VeraCrypt and Dismount the hidden container.

Accessing the Outer Container

What if you need to access the files in the outer container? For example, you may wish to copy updated fake data into it in order to keep it looking realistic.

It is possible to get to the outer container, but you need to take a few extra steps to prevent over writing the data in your hidden container.

As normal, enter the file name for your container (or select the device), pick a drive letter, then click Mount.

When the mount dialog appears, enter your password to the outer container. But WAIT!

Before you click OK, you need to click on the Mount Options button.

Go down to the bottom and check the box that says “Protect hidden volume against damage caused by writing to the outer volume“.

Now enter the password to the hidden volume, then click OK.

Now it displays another message warning against updating the hidden volume. It is possible, but not recommended, to have both the outer and hidden volume at the same time. Writing data to the hidden area could corrupt both the outer and inner areas.

As such I have a personal rule never to have both volumes open at the same time, and I highly suggest you stick to that rule.

Now you can click OK to mount the outer volume. With the outer volume now mounted, you can now access it in your file explorer.

Here you can see my Twitter photo I copied in originally. I can now update it, or copy in a few more files, up to the amount I have space for.

In my case, I have a 250 MB container, but I’ve reserved 125 MB for the hidden space, leaving me roughly 125 MB to put data in the outer area (VeraCrypt does use a little space in the container for its data).

Backup To Prevent Unintentional Damage

Remember how I said you could give the password to the outer container to an agent, or perhaps a bad guy?

Obviously you aren’t going to tell them about the hidden container, as such they won’t use the Mount Options to prevent overwriting the hidden area. Thus it is possible they could wind up destroying your hidden info.

To prevent this, be sure to make a backup of your container. Store it in a safe place away from home, such as a relatives house or your safety deposit box. This way a bad guy could go so far as to destroy your device and your data will still be safe.

Containers in Containers

One last thing, be aware VeraCrypt has no problems storing encrypted containers inside other containers.

For example, you could use VeraCrypt to encrypt a thumb drive. Then you could create a second file container, perhaps one with a hidden volume, and store it on the encrypted thumb drive.

You could go so far as to give it a different extension, perhaps using .dat instead of the default .hc, so a casual observer would not know it is a VeraCrypt container. When you select a file to mount, VeraCrypt doesn’t care what the extension is.

While this may seem a little paranoid, it is possible you may have a need for this level of protection so I just wanted you to be aware this option exists.

Conclusion

In this post I covered how to use the hidden container feature of VeraCrypt, one of it’s advanced options. Using it you can protect your most sensitive data.

In the next and final post we’ll see how to write scripts so you can automate the process of mounting and dismounting containers.

Veracrypt – A Powerful Encryption Utility

Introduction

I’m a huge podcast junkie. I’m subscribed to almost 200 podcasts on a variety of subjects, the majority of which are tech related.

One podcast I listen to is Grumpy Old Bens. The hosts discuss technology in relation to current news events. In an episode earlier this year they were discussing how to protect the data on your computer should, for example, you need to bring your laptop to a computer repair shop, forget it is there, and the owner decide to look through your drive.

One of the tools they mentioned is VeraCrypt. I’ve used VeraCrypt for years, and before that its predecessor, TrueCrypt.

Multi Platform

As with the other tools I’ve described in this series, VeraCrypt is multi platform with versions for Windows, macOS, and a wide variety of Linux distros.

Sadly there are no versions for portable devices such as iOS or Android.

Be aware what you encrypt is portable between platforms. If I encrypt something using VeraCrypt on macOS, I can later open it on Linux for example, or Windows.

Open Source

VeraCrypt is an open source application. Their website allows you to download all the source code. This allows you to inspect the source code and even build your own version of VeraCrypt from it.

How VeraCrypt Works

VeraCrypt has two modes of operation. First, it can encrypt an entire drive. This can be your main hard drive, a secondary drive, or one you plug in such as an external USB hard drive, USB thumb drive, or even an SD or MicroSD card you’ve placed in your computers card reader.

It uses industry standard encryption methods, and there are a wide variety you can select from, to scramble the contents of the drive to make it unreadable.

As a matter of fact, if you plug in an encrypted USB drive Windows will pop up an error message that you must format the drive for it to be used. Naturally you will want to cancel out of it, but this makes the drive more secure. An unknowing person will pop it in, and just assume the drive is bad. They’ll either throw it away or just reformat it, either way your data is kept out of their hands.

To use the encrypted drive, you’ll need to open the VeraCrypt software and select the drive to mount. Provide your password, and it will make it available. We’ll cover the steps more closely in a moment.

The second mode will let you create an encrypted file container. This is a single, encrypted file on your hard drive. Once you mount it, VeraCrypt will add a new drive letter to your system (on Windows) or mount point on other platforms.

You can move files in and out of this “drive”, create folders, or use it like any other drive. When you Unmount it, the files are no longer accessible.

How to Encrypt a Drive – Step 1

I’ll assume you’ve gone to the VeraCrypt Downloads page, and have downloaded VeraCrypt for your operating system. For this demo, I’ll be using Windows.

Begin by opening VeraCrypt. (As with all my posts, you can open the image to see the full sized view).

Begin the process by clicking on Create Volume. This will launch the VeraCrypt Volume Creation Wizard.

Step 2 – Pick the item to encrypt

For this demo, I want to encrypt an entire drive, specifically an 8 GB thumb drive I’ve plugged into a USB port. As such, I need to pick the second option, Encrypt a non-system partition/drive, then click Next.

Step 3 – Volume Type

We’re now asked if we want a standard volume or a hidden one. I’ll take about hidden volumes later in this post, so for now we’ll go with a Standard VeraCrypt volume and click Next.

Step 4 – Volume Location

Now we need to select the drive to encrypt, in this case our thumb drive. Click on the Select Device button so we can get its exact ID.

The laptop I’m writing this post on is configured to dual boot between Windows 10 and Kubuntu 21.04. It has two physical drives. The first one listed is a second 1 TB drive I use for storing VMs.

The second drive, listed as Hard Disk 1, is the 2 TB drive with its various partitions. I have one partition for Windows (C:), one for Kubuntu (listed as Partition 5). The remaining 1.2 TB partition is shared between Kubuntu and Windows. There’s a few other partitions for the GRUB booter and other recovery items.

Now here’s where we need to be careful. There is a listing for Harddisk 2, of 8 GB, and as your recall my thumb drive that I want to encrypt is 8 GB. This partition though is actually a recovery partition.

Any external drives I want to encrypt will be listed as a Removeable Disks. In the image above (surrounded by the red square) is my 8 GB thumb drive. I’d previously formatted for NTFS it and it is empty.

MAKE SURE YOU PICK THE RIGHT DRIVE!

You take full responsibility for picking the right drive, if you pick the wrong one I take no responsibility.

So with the thumb drive now picked, I’ll click on OK. Then back on the Volume Location screen I’ll click Next.

Step 5 – Volume Creation Mode

Next you are given a choice. In the first option, it will delete the contents of the drive and create an encrypted drive. If your drive is empty this is by far the fastest method.

If there is data on the drive you want to keep, then you should pick the second option. It will retain the files and put them into the drive once it is encrypted.

Because this option is slow, I would suggest moving any files to another drive, encrypting it, then moving them back when done. Even if you choose this option, I would highly suggest you backup everything just in case something catastrophic occurs such as a power outage or blue screen during the process.

Because my drive is empty, I’ll take the default and click Next.

Step 6 – Encryption Option

In this step you are asked what encryption algorithm you want to use. I’ve clicked the drop down so you can see the long list. For most instances, the default of AES using the SHA-512 is sufficient, but I have encountered clients who require a specific encryption algorithm be used.

The good part is that all of these are industry standards that have been vetted by security experts. For this demo I will use the default of AES and click Next.

Step 7 – Volume Size

If we were creating a container we would have the opportunity to select a size for it. In this case we are doing an entire drive, so VeraCrypt just informs us of the device name and the size of it as a confirmation we’ve picked the drive we wanted.

This is correct for this demo, so we’ll just click Next.

Step 8 – Volume Password

In the next screen you’ll enter the password that will be used to decrypt the drive. You can also check the Display password box so you can see what you are typing, which I highly recommend.

Because this is a demo, I’ve used a trivial password of MySuperSecurePassword1! but obviously you will want to use something much stronger.

I’d also suggest storing the password in your password manager. I use LastPass (which I’ll blog about in the near future). It has a Secure Note feature which I store my drive passwords in. You could also put them in Standard Notes, the subject of my previous blog post.

Once you have entered your super secure password, click Next.

Step 9 – Large Files

If the drive or container you are creating is larger that 4 GB then you will be asked if you want to store files bigger than 4 GB on it. (If the container or drive is 4 GB or smaller this step is skipped.)

This will determine how VeraCrypt formats the drive. The default is No, but I almost always change it to Yes, just in case.

After changing it to Yes, I clicked Next.

Step 10 – Format it!

Without getting too technical, one of the key factors for good encryption is having a random pool of data that can be used in generating the encryption key.

VeraCrypt gets this from the movement of your mouse around the window. As you jiggle your mouse around randomly, the bar at the bottom will change color from red, to yellow, then green. For best results, keep moving your mouse around until the bar is solid green all the way across the bottom.

Once it is solid green you can click on Format to begin the process.

After clicking format, you are given the warning that any data on the drive will be lost, are we sure we want to proceed?

If you are sure, take a deep breath then click on Yes.

The Volume Format screen now updates to show the progress. You’ll find it in the center, highlighted by the red rectangle in the above image.

The green is a progress bar, and you can see the exact percentage and speed below. To the very right is the time left, 21 minutes when I took this screen shot.

Be aware even on a fast computer this type of encryption can be a slow process. This small 8 GB drive takes about 20 minutes. A multi-terabyte drive can spend several hours encrypting. For that reason, on large drives, I’d suggest kicking off the process then going to bed.

When formatting is done, you will be provided this informational message:

My thumb drive was assigned drive F when it was plugged in, this message just says be sure to pick a drive letter other than F (or another used one) when you go to mount it. Just click OK to dismiss the message.

When you do, VeraCrypt will let you know the volume was created successfully.

You’re then returned to the wizard, where you can create another drive or exit. In our case we’ll click Exit.

All done, let’s use it!

Now that formatting is complete, let’s see how to mount our new drive.

As I mentioned before, when you plug in the VeraCrypt encrypted drive, Windows and other operating systems will complain the device needs to be formatted before it can be used.

Be sure to cancel out of it!

Once you’ve told your operating system to go away and that you know what you are doing, bring up VeraCrypt.

Because we’ll be mounting a thumb drive, we’ll need to click on the Select Device button.

We will need to scroll down to our list of removable disks, and pick our thumb drive then click OK.

With the device filled out, next go to the list of drive letters above and pick out a drive letter that is unused. for this demo I’ve picked the Z: drive. (Note this will differ for other operating systems.)

Now just click on Mount.

Note I check on the Display password box so we can see what we’re typing, and I’ve entered our super secure password. Before we click OK, I just want to call your attention to the Mount Options button.

One option that may be useful is the mount as read only. This is also where you can setup hidden volume protection, which we’ll talk about later. For now we can cancel, then back on the password entry window click OK to mount our drive.

As you can see VeraCrypt now updates to show our Z drive is now mapped to our thumb drive! It shows up as the Z drive in explorer and we can begin to use it like any other drive.

We can now copy files into our encrypted drive using your operating systems file explorer.

Creating an Encrypted Container

As previously described, an encrypted container is a single file which can be used to store data securely. As the steps to create one are almost identical to encrypting a drive, we’ll only highlight the differences here.

We’ll start on the main screen by clicking Create Volume.

On the VeraCrypt Volume Creation Wizard this time take the Create an encrypted file container option and click Next.

In the Volume Type screen, pick Standard VeraCrypt volume and click Next.

On the Volume Location screen, I’ve entered C:\Temp\demo.hc for the file to store my encrypted data in. VeraCrypt uses hc for its default extension, although if you wanted added protection you could give it a different extension. Once that was entered I clicked Next.

The next step is the Encryption Options, I’ll take the default of AES and click Next.

Next up is the volume size, how big do we want our container. You can size it in terms of kilobytes, megabytes, gigabytes, or terabytes.

For this demo, I am making it 100 MB in size. I’ve created containers of several hundred gigabytes for storing client data. I’ve also created some as small as 10 MB because I wanted to securely email information to someone (who I’d given the password to over the phone).

For now, we’ll go with the 100 MB and click Next.

Next up is the Volume Password screen, I’ll be using the same MySuperSecurePassword1! that I used in the previous demo and clicking next.

The final step is the Volume Format, where I’ll jiggle the mouse around a while to create a random data pool to be used in encryption. Once it is green I’ll click Format and let it format my encrypted file.

Because this is so small formatting goes very fast. When done I’ll just click Exit to end the wizard.

Mounting a File

Start with the main VeraCrypt dialog. Then click Select File to locate the C:\Temp\demo.hc file (or whatever your file name is).

I’ll then pick an unused drive letter, in this case the Y drive, and click Mount.

I’ll enter my super secure password and click OK and my encrypted file container will now be mounted as a drive!

Your Y drive will now appear in your file explorer, ready to use.

Dismount Your Drives

When you are done using your encrypted drive or container, be sure to dismount it when you are done. This will ensure the container is safely shut down and you won’t lose any data.

Hidden Containers

Hidden VeraCrypt containers is an advanced subject I’ll save for a future blog post as this has already gotten very long.

In short though, VeraCrypt lets you embed one container in another. Let’s take our 8 gig thumb drive as an example.

In the wizard, when you select the hidden container option, it will first walk you through the creation of a regular container. In this case our 8 gig thumb drive.

You could then copy some files into it that look like something sensitive. Perhaps some spread sheets with your family budget, or images of receipts. Stuff you might want to plausibly remain hidden, but if it got out wouldn’t be overly damaging.

It would then walk you through creating a hidden container. You could specify you wanted 5 of the 8 gig devoted to the hidden partition. Into it you could place your important data such as copies of birth certificates, marriage licenses, that kind of thing.

The idea is if a bad guy forces you to give up your password, you give them the password to the “outer” or regular drive. All they see is the spreadsheets and receipts you placed there.

The bad guys think they have the info, and have no way of telling you have a hidden partition setup.

When you want to use the hidden partition, you simply supply the password to the hidden area instead of the regular one.

As I said this is a bit of an advanced topic, so we’ll cover it more in the near future.

VeraCrypt Version

Please note the information in this post is valid as of the date I wrote the post. For it I used VeraCrypt Version 1.24-Update 7.

The interface and functionality of VeraCrypt has remained steady over the years so I don’t expect any significant changes, but things on the internet stay forever. If you are reading this five years into the future expect some minor differences between the post and what you see in your version of VeraCrypt.

Conclusion

With the proliferation of hackers and other bad guys, keeping data secure is more important than ever. I create containers for each of my clients to keep their data secure, and separate from other clients.

Additionally I have containers for my family documents such as copies of birth certificates, social security cards, and the like. Made small enough these can be easily stored in places like OneDrive or DropBox for easy retrieval.

As stated, in upcoming posts I’ll cover hidden containers, as well as how to script the mounting and unmounting of your containers.

Standard Notes – A Secure, Multi Platform Note Taking App

Introduction

With this post I’ll continue my series on useful tools and utilities. In this post I’ll talk about an outstanding application called Standard Notes. You can find and download Standard Notes from its website, https://standardnotes.org/.

Now, I know what you are thinking, “Yet another note taking app? What makes this so special?”

Well as it turns out a lot. Let me start by covering some of its special characteristics, then we’ll get a short overview on how to use it.

Multi Platform

As I stated in my previous post on Microsoft To Do, I have a strong preference for apps that work across multiple platforms. Standard Notes has apps for Windows, macOS, and almost every Linux Distro. In addition, it also has mobile apps for Android as well as iOS, both phone and tablet.

In addition, you can also login to the Standard Notes with your web browser and access your notes that way. Handy for when you are using a computer or device that you can’t or don’t want to install the Standard Notes application on.

The notes you enter are synced across all of your devices, much like Microsoft To Do. Enter a note on your Mac, and it will be there on your Android device, or any combination of the platforms I just mentioned.

Open Source

Standard Notes is an open source project. All of the source code is available for you to inspect, and even contribute to.

The syncing ability is handled by Standard Notes using their sync server software. The Standard Notes sync server is also an open source project that you can download. As such you can stand up your own private sync server and use it to sync all of your notes. Very useful if you are super concerned about security, or want to stand up your own Standard Notes server for your companies private use.

This also has some very positive implications to the longevity of Standard Notes. Let’s say the owners of Standard Notes win a bazillion dollars in the lottery. They hang up a “going out of business” sign on their website and head off to a remote island in the Bahamas for an early retirement.

You (or your company) could download the server project and spin up your own sync server. You can restore your backup to the new server, make an adjustment in the app to point to your private sync server and you are back in business. This capability should make any business more confident in adopting Standard Notes.

I mentioned backups, by default Standard Notes will perform an automated backup on a regular basis. You can (and should!) also do a periodic manual backup via the Account menu.

Encrypted Notes

Speaking of security, the biggest benefit to Standard Notes is encryption. It uses industry standard encryption, not something they made up themselves.

All of your note data is encrypted on your device. It is then sent to the sync server over an encrypted connection. As Standard Notes doesn’t have your password they have no way to decrypt the data. Even if someone got access to their servers, all the data will be gibberish.

They do make it clear, if you forget your password, they have no way of helping you. You need to make sure to store your password in a safe place like your password vault.

Freemium Model

Standard Notes uses what is known as a “freemium” model. The base application is free. You can take an unlimited number of notes, and these will be synced for you.

In the free model, you are restricted to text only notes. In addition, you are stuck with the basic color scheme of a white or gray background with black text.

With the paid model, you gain access to different color themes. It also enables you to use the rich set of extensions Standard Notes offers. Most of these extensions are around various editors. One is a code editor, that gives syntax highlighting for a huge array of languages.

There is another editor which gives you a “Word” like environment to do bold, italic, and the like. There is also a MarkDown editor if you prefer to edit and save MarkDown data.

Another editor I use a lot is the checklist. It lets you create check lists, and once you mark an item complete it moves to the bottom under completed tasks. This can be useful when the contents of your checklist are sensitive and need to be kept extra secure.

The premium model is done with subscriptions of 1, 3, and 5 years. The 5 year model works out to less than $3 (US) a month (at the time of this writing), which is very reasonable and funds their sync servers and development.

Setting Up Standard Notes

The Standard Notes website has instructions for downloading and installing it on the variety of platforms it supports, so I will refer you to it for your computer or device.

When you open Standard Notes the first time, it will open up with the Account pane. Note that for all the images in this post you can click on it to open up a bigger version.

You’ll need to start by clicking the Register button to create an account. When you do, it will prompt you for an email address and password. It will then send you an email just to confirm you are a real person.

Note the big No Password Reset box, warning you that if you lose your password, there is nothing the Standard Notes group can do to help you. I highly advise the use of a password manager, such as LastPass, which will be the subject of a future blog post.

Also note that the combination of your email and password is used to generate your security encryption keys. This means your email address will be case sensitive.

YourName@email.com, yourname@email.com, and YOURNAME@EMAIL.COM are all different. When you login to your other devices, you must key in both your email address and password in exactly the same case you use to create your account.

Using Standard Notes

Here is the Standard Notes app with some sample notes I’ve created.

The left side panel is the Views panel. You can organize your notes into groups called Tags in Standard Notes. You can enter any text you want for a tag name.

Additionally a note can have multiple tags associated with it. This will let the same note appear in multiple tag views.

The center column is the list of notes. If you click on a tag, the list of notes is filtered to show just the ones with that tag. In addition to the name of the note, it also has the first few words of the note and the last date the note was modified on (although you can change this in the settings).

In the example above, I have a note called “Harbor Freight Shopping List”. Under the title of the note I have two tags, Ham (referring to my Ham Radio hobby) and Lists. I could click in this area to type in the name of another tag if I wish.

In this next example, I’ve clicked on the Household tag in the Views pane.

As you can see, my list of notes is now reduced to just two, the ones who have the tag Household assigned to them.

Uses for Standard Notes

The uses for Standard Notes are only limited by your imagination. Because your notes are encrypted, you could use it to store information like phone numbers, vehicle VIN numbers, even passwords (although I’d suggest a more robust password manager of some type, such as LastPass).

It could also be used to store all kinds of tips and tricks. Items that don’t necessarily need to be encrypted, but you’d like to store and have handy in the future.

Anytime I have to do a search to figure out how to do something, I make a note so I can refer back to it in the future.

Premium Benefits

As a big fan of Standard Notes, I have purchased the premium subscription. I first did a one year subscription to see if I liked it, but got hooked so when it was time to renew I went with the five year subscription and haven’t regretted it.

Here you can see my Standard Notes paid subscription with one of the color themes applied.

As you can see from my list of tags on the left, I have a LOT of notes in Standard Notes. Here you can see a PowerShell script to remind me how to use the StringBuilder in PowerShell. I’m using the code editor, and have selected the PowerShell language.

This is just one of the many languages available, pretty much every programming language is included.

I also use Standard Notes for check lists, regular notes, and more.

In addition to the editors, the extensions also provide for various color themes, plus a selection of enhancements to Standard Notes. One developers may find useful is the GitHub Push extension, allowing you to push a note up to GitHub.

Want an extension but don’t see it? The Standard Notes site on GitHub has instructions for authoring your own extensions. This is also where you can access the source code for Standard Notes, the Standard Notes server, and more. You can also log issues, make suggestions for improvements and new features, and check for solutions to past issues.

Also note that your premium subscription unlocks the premium features on all of your devices. There is no limit to the number of devices or computers you can have Standard Notes (even with your premium subscription) running on.

Passcode Lock

Another useful feature is the Passcode Lock. This is similar to the pin login feature of Windows 10. You can turn on Passcode Lock in the Account menu area.

When you launch Standard Notes it will prompt you for the Passcode Lock. The lock can be any combination of letters, numbers, and special characters you want. I use a long complex gibberish password for my Standard Notes account, but use a little easier to remember and type Passcode Lock.

I consider this a “nosy person” feature. It keeps a nosy family member or coworker from walking up to your computer while you are getting coffee and snooping at what’s in your Standard Notes.

In addition, you can set an Autolock timer. After a certain amount of time Standard Notes will lock itself. By default Autolock is set to Off.

It also has an Immediate setting, which locks Standard Notes the minute you click away from it. There are also timers for 1 minute, 5 minutes, and 1 hour.

You can also remove the Passcode Lock when you decide you no longer need it.

On iOS, you can also lock Standard Notes using either Face ID or the Fingerprint reader. I would imagine Android tablets/phones that support biometric security also have this feature, but my Android tablet lacks biometric security so I’m unable to test this.

Other Notable Features

I just wanted to mention a few other useful features.

You have the ability to sort the list of notes in a variety of ways. By default it uses most recent at the top, but you can also sort alphabetically. You can also reverse the sort so oldest is first, or titles are sorted Z to A.

You can also Pin notes so they will always appear at the top of the note list, regardless of what sort order you select. In addition to pinning, a note can be Locked, which puts it into a read only state.

You can also get rid of a note by selecting Move to Trash, then go to the trash can and choose to delete all notes in the trash can or just individual ones.

The final feature I’ll mention is the ability to Archive a note. Let’s say you have a note on how to do something in Ubuntu 16.04. It’s highly unlikely you’ll need to use this on a normal basis, and don’t want to see it cluttering up your list.

However, the information is valuable, and on the off chance you may need it you really don’t want to trash it. This is where the Archive feature comes in. In any note, simply pick Archive in its Options menu. The note will no longer appear in the list view or searches.

You can easily bring it back though. First, in the list view’s options menu you can turn on the appearance of Archived notes. Later you can use the same option to again suppress the appearance of Archived notes.

If you suddenly find that previously archived note is useful, you can pick the note, then in the note editors options menu just Unarchive it.

Standard Notes Version

The instructions in this post are valid at the time I wrote it, using Standard Notes version 3.6.9.

Standard Notes is under continual development, so depending on when you read this there may be some subtle differences between your version and the one I’m using for this post. The core concepts should remain constant though.

Standard Disclaimer

I just want to be clear this is in no way a paid for post. Nor do I receive any discount for talking about it. I paid my own money for it just like everyone else. I just love the tool and wanted to share it with others.

Conclusion

Give Standard Notes a try. You can do so for free, and I think once you do you will quickly find it an indispensable tool in your kit. It’s a tool I use literally every single day.

Microsoft To Do

Introduction

This post continues my series on useful tools and utilities. Here we’ll be covering Microsoft’s To Do application.

There’s a famous quote “If you don’t write it down, it doesn’t exist.” A “To Do” list is a great way to capture tasks or information you need to remember. Some people use paper, or a variety of other devices or applications. For me, Microsoft To Do is the place to capture this information.

Some of you may remember Wunderlist. Microsoft bought Wunderlist a few years back, and have transformed it into Microsoft To Do.

Multi Platform

I use a variety of devices and platforms on a regular basis. One of the things I find useful about Microsoft To Do is the availability of apps on almost all platforms.

There are apps for Windows, macOS, Android, and iOS. On Linux (or other platforms), you can access Microsoft To Do in any web browser.

I also found a blog post that describes an application called AO that runs on most Linux distros. It’s basically a wrapper around the To Do web page. I use it on my Kubuntu laptop for working with Microsoft To Do.

Using Microsoft To Do

I’ll quickly illustrate the various uses of To Do with some screen shots. (Note that you can see a bigger version of any of these images by clicking on them.) The first one shows the basic layout of To Do.

The default view of To Do is “My Day”. To Do allows you to designate tasks for immediate action called “My Day”. More on that in a moment, but here you can see one task for a new Pluralsight course I’m currently working on, the SQL Server Mobile Report Publisher.

The menu of actions appears down the left side of the application. To add a new list, simply click the “+ New List button”. This is very simple, it just brings up a page and you can start typing in your tasks.

You can rearrange the list by clicking and dragging the tasks into any order. Note that by default new tasks are added to the top of the list, but you can go into the settings menu to change this behavior so new tasks are added to the bottom (which is what I do).

Simple Lists

Microsoft To Do can be used for simple lists. Here you can see a grocery list.

To Do makes generating a grocery list like this easy. I can enter my list on my computer, where I have a full keyboard. To Do then syncs my list to all of my devices.

When I pull out my phone in the grocer store, I can simply mark each item off as I put it in my grocery cart. Completed items are moved to the bottom of the list, making it easy to see the items I still need to get.

When I get home, I can either delete each completed task individually, or right click on the “Completed” header and delete them all at once.

Projects

Another use for To Do is project tracking.

Here is the list for my current project, the Mobile Report Publisher course I’m working on. This list is a high level view of the tasks I need to complete for the course.

For each task, I can create a list of sub tasks that need to be completed.

When I click on the task, a pane pops out on the right. I can enter a series of steps for setting up my virtual machine. Installing Win 10, Installing basic tools, and more.

Here is the detailed information for another task in the list, Create Data Source in the Report Portal.

This task only has one step. However, I’ve clicked on the “Add to My Day” which will add the task to the “My Day” screen To Do opens to.

With To Do I can also set a Due Date. To Do makes it easy, I can set it today, tomorrow, next week, or I can pick a specific date. I can also set a reminder, so To Do will remind me when a task is coming up.

I can get an overview of all my tasks with due dates by clicking on the Planned link on the left side of To Do.

Here you can see the one task I planned with a due date. The nice thing about the planned tab is that it shows tasks coming due across all your lists.

For example, I could have assigned a due date for an item in my grocery list so I’d be sure to have an ingredient for a planned meal. Or perhaps I have another list for planned blog posts.

All tasks with due dates that haven’t been marked as complete will show up here on planned, making it easy for me to get an overview of upcoming tasks no matter what list they are on.

To Do and Multiple Accounts

To Do allows you to manage multiple accounts. By clicking on the account name it will show you a list of all To Do accounts you’ve logged into.

Here you can see I have two accounts logged in, one I use for work, the other for personal items such as grocery lists. This makes it nice as I don’t have to mix work and personal lists.

It’s also useful when I work with multiple clients, when the client provides me an account to use in their organization. I can easily keep each client’s task list separate from each other a well as my personal lists.

List Management

The final item I’d like to show is list management, accessible by right clicking on a list.

Some items are pretty obvious, such as deleting or renaming a list. You can also duplicate a list, or print it out.

The biggest feature I like is the “Share list” option. You can share a list with another Microsoft To Do user. A good example is the grocery list. I share mine with my entire family. When another family member needs a grocery item, they can simply add it to the list.

There’s no need to tell me, or send a text, or anything else. When I get to the store, there’s the item on the list. If it’s something odd or unusual, they can click on the item and in the pop out pane on the right add a note to the item to explain why it is needed.

Another use is for small projects with your coworkers. You can assign a task to another person. They will see the task as assigned to them, and as they mark the task, or each step in a task, complete the others that the list has been shared with will be updated automatically.

This makes it nice for a project manager, as they can easily see the teams progress for each task.

Conclusion

As you can see, Microsoft To Do is a great tool for managing lists, or for tracking progress of your smaller projects. The multi-platform capability makes your data easily accessible across any device you are using.

There are many more uses you can put To Do to. I’ve used it for managing home repair projects. I even have some lists for favorite recipes, that list includes the ingredients as well as cooking instructions.

If you can think of more uses for Microsoft To Do, then by all means leave a comment so we can all learn.

Cut and Copy Fast and Easy with Pantherbar for Windows

Introduction

In a previous post, I showed a tool to make Cut and Copy easy on macOS. In this post we’ll look at a tool, Pantherbar, to provide similar capability on Windows.

Pantherbar

Pantherbar is available in the Microsoft Store. It has a free version, as well as a paid one at the reasonable price of $4.99 (US).

Similar to PopClip when you highlight text, it pops up a toolbar.

As you can see from the image above, Pantherbar appears with several icons. The left most is copy, next is cut. If you have anything in the clipboard the paste icon appears next.

The magnifying glass will launch a search in your default browser. By default it is Google, but through the settings you can change the search engine. Finally is the share with windows icon.

Extensions

Pantherbar has a rich set of extensions you can add to it. You can view the full list at http://pantherbar-app.com/extensions

In the free version you can have two extensions active. In the paid version, you can have as many as you want.

In this next example, I’ve loaded three extensions. In the image below I’ve highlighted some text in notepad.

The three new ones on the right are character count (handy for composing a tweet), reverse the text, and remove spaces. In the image below I’ve clicked the reverse text option.

As you can see, the text is reversed immediately, replacing what had been selected.

Note this is a little different than the behavior of PopClip on macOS. PopClip copies the modified text to the clipboard. Pantherbar immediately pastes the new text in.

To be honest, I prefer this behavior. The majority of the time I’m going to put the corrected text where I had selected, so this saves a few steps.

Conclusion

Pantherbar is a useful addition to your Windows toolkit. With its rich set of extensions, you can save a lot of time performing common tasks. You can try it for free, and if you decide to buy the price is very reasonable.

Do note that this, nor the PopClip blog post, are paid posts in anyway. I just like the tools and was happy to pay for them.

To my knowledge there is no similar extension on the Linux platform, at least for the Ubuntu based distros I tend to use. As I understand it, the current graphics engine makes this kind of extension difficult. It’s hoped though that once the Wayland engine gets into wide spread use tools similar to Pantherbar or PopClip will become available on Linux.

If you know of one that exists, by all means leave a comment. I’d love to check it out!

Stop Discord from Automatically Running When Windows Starts

Introduction

I use Discord as part of the weekly YouTube Minecraft stream I participate in, Adults Only Minecraft (which is actually family friendly), run by my friend Marc.

Of late though, Discord has been misbehaving. Even though I have it set not to auto load when Windows launches, it ignores the setting and still runs.

While I like Discord, I only use it once a week or so, and don’t want it running in the background all the time.

In this bonus post, let’s see how to fix this problem.

Check Your Discord Settings

First, let me state that not everyone is experiencing this issue, or needs the solution I’ll outline here. Let’s start with the simple solution first.

Open Discord, then your settings. Scroll down to Windows Settings, as you see below.

The toggle, pointed at by the arrow, indicates whether Discord should launch with Windows. If yours is on, and you don’t want it to auto launch, just click on it to turn it off as seen in this image.

Exit Discord, reboot, and if Discord does NOT launch, you’re done!

In my case however, that did not correct the issue. If that was the case for you too, proceed to the next section.

Disabling Discord Autorun in Windows

In the past, people have written instructions to go into Task Manager, expand into the detailed display, go to the Startup tab, and disable Discord.

Over time though, Discord changed things so their application no longer appears here. To fix, we’ll need to go download another tool called Autoruns.

Go to https://sysinternals.com, this will redirect you to a Microsoft web page (Microsoft bought SysInternals quite a few years back).

Once there, click the Downloads link on the left. SysInternals is a rich suite of tools, and you can certainly download all of them, but the only one you need for this task is Autoruns. Simply scroll down until you see it appear.

Click on the link to take you to the Autoruns info page, the download link is at the very top. Click on it to download the Autoruns.zip file to a folder on your hard drive.

Unzip the contents and it will expand several files. No installation is needed, these will simply run from wherever you put them. If you are on a 64 bit operating system, and pretty much anyone with a modern computer is, the file to double click on is Autoruns64.exe. If you are on an older 32 bit computer, you can run Autoruns.exe.

A little side note, after running the application the listing area uses an incredibly small 4 point font. Easy to fix, in the menu click Options, Font, and pick a bigger font size. For this image I went with a 12 point font.

At the top is a filter box, pointed at by the green arrow in the image below.

Enter the word Discord into it. Autoruns should then filter the list to just the entry for Discord.

Now simply uncheck the box, pointed at by the orange arrow in the image above.

That’s it!

OK, you are done. Close Autoruns, and reboot your computer. When you do, Discord should no longer start up automatically.

Discord Updates

Note, it is always possible after an update from Discord, they will reset this to turn it back on. If you suddenly find Discord starting up again when Windows boots, then just follow the instructions again to disable Discord in the Autoruns app.

It’s also possible at some point in the future Discord may correct this issue. Occasionally, perhaps once a month, check this back on then reboot to see if Discord still launches or not.

Conclusion

Don’t get me wrong, I like Discord a lot, and use it weekly. It’s a great tool for gaming. However, when I’m not playing Minecraft I don’t want it running in the background all the time, taking up resources.

If that’s the case for you then hopefully this post will aid you in correcting the issue.

Cut and Copy Fast and Easy with PopClip for macOS

Introduction

Everyone has little tools they find useful, tools that make using their computers easier. Often they are time savers, even ones that only save a second or two will add up over time.

I thought I’d spend a few posts talking about some of my favorites. In this first post we’ll talk about a tool to make cutting and copying text into the clipboard fast and easy on an Apple Mac – PopClip.

PopClip for macOS

Cut and / or Copy of text is something we all do a thousand times a day. Even though it’s fast action, anything we can do to make it even faster adds up by the end of the day.

On the Apple Mac, I found PopClip to be a fantastic tool. It’s available in Apple’s App store, for the reasonable cost of $12.99.

So how does it work? Well it’s pretty simple. Start by highlighting text, here I’ve opened the basic text editor on my MacBook and highlighted part of a sentence.

When you highlight text, you will see a little toolbar automatically appears or “pops up”, without having to right click or take any other action.

Here PopClip is giving us the option of cutting and copying the text. I also happened to have something in the clipboard, so the option to paste that in also appears.

The magnifying glass will launch our default browser and use your default search engine and do a search on the selected text.

But wait, there’s more!

In addition to the standard cut / copy / paste, PopClip offers a vast array of extensions. In the following screen shot, I’ve added the braces extension.

With the braces extension added, you can now see additional options added to PopClip’s bar. For this shot, instead of clicking copy I’ll be clicking on the Square Brackets button.

This will copy the the text into my clipboard, adding brackets around it. Then when I paste it, the pasted text now is surrounded by brackets as you can see above.

The braces are just one of over a hundred extensions available to you with PopClip.

Conclusion

I realize it may seem simple, but once you try it you will be amazed at how much nicer cut and copy becomes on your Mac. In addition the vast array of extensions will make other operations you frequently do, such as surrounding text with braces, fast.

In the next post we’ll look at a similar tool for Windows, then over the next few posts highlight some other tools I find very useful in my daily life.

Connecting to SSAS from Report Builder Query Designer – A Connection Cannot Be Made

Introduction

Recently I was attempting to create a dataset in the SQL Server Reporting Services Report Portal. I created my data source, then launched Report Builder to create my Dataset.

Report Builder connected to my SQL Server Analysis Services Tabular database OK, the Test Connection button worked, but when I tried to go into the query designer I kept getting the error:

A connection cannot be made. Ensure that the server is running.

I knew my server was running, I could connect to it and run queries from SSMS (SQL Server Management Studio). I found some solutions that suggested I change my SQL Server Browser service to log on using the Local System account. Tried it, didn’t work.

I found another solution recommending I add a firewall rule to allow inbound traffic on port 2383, but no love there either.

The Solution

It turned out it was all related to the way I’d formatted my data source connection string in the SSRS Report Portal. I had entered it as:

Data Source = acdev;initial catalog = WWI-SSAS-Tabular

When I used the Test Connection button in the Report Portal, it worked fine. It even let me connect when I launched Report Builder. But when I tried to launch the query designer in Report Builder, it gave me the aforementioned error:

A connection cannot be made. Ensure that the server is running.

I came upon my solution by launching Report Builder, and telling it I wanted a data source embedded in my report. On my first attempt I simply copied what you saw above from the Report Builder, and was faced with the same crushing disappointing result.

On the second try I used the Report Builder feature to actually build my connection string. Report Builder produced:

Data Source=acdev;Initial Catalog=WWI-SSAS-Tabular

And by golly, it worked! I was able to use the query builder to create a DAX query.

To be sure I was still sane, I went back to the Report Builder and replaced my connection string with the one above. Still in the Report Portal, I added a new Dataset which launched Report Builder.

I picked the Data Source I’d just updated in the Report Portal, and this time I was able to get into query builder, create a new query, and save it back to the server as a dataset.

Conclusion

I can only guess it was the extra spaces around the equal signs that were messing things up. I’d added the spaces thinking it made it a bit more readable. Readable, but as it turns out non-functional.

Some of you maybe going “you big dummy” at this point, and perhaps justifiably. I still think it’s odd though that the test connection buttons in multiple tools all worked, yet the query designer crashed.

Regardless, I’m happy I was finally able to find the solution. I’d spent almost five hours on this, so hopefully this will save you a little time and get you back to creating queries.

What is My COM Port?

Introduction

I’m a ham radio operator, and I recently gave a presentation to my local club on how to program your radio using software. To do this, we need to connect our radios using a USB cable.

Most of the radios use a concept called a VCP or Virtual COM Port. You install the VCP driver, then can connect your USB cable to your computer, plug the other end into the radio, and launch the software.

The software will want to know, what is the COM port number you are using. I have a variety of radios, and it seems each cable wants to use a different COM port, and every so often the cable will wind up using a different COM port than it did last time.

So how do you find out your COM port? Well it’s pretty easy if you know where to look.

Finding Your COM Port

The best place to find this is in the Windows Device Manager. Click on the magnifying glass next to the Start menu icon.

I have my Windows toolbar set to hide the search entry box, but some systems will have a text box right next to the search. Which ever way yours is configured, start to type “device manager” into the search.

You should see a pop up like you do in the image above when it finds the Device Manager application. Just click on it to run it.

Scroll down in Device Manager until you find the entry for “Ports (COM & LPT)“. Click the arrow beside it in order to expand the list, and you should now see the COM port for your cable, in this case COM10.

Note that your cable will need to be plugged in for the entry to appear.

Conclusion

There you go, I told you it was easy, the trick is knowing where to look.

While I did write this with my fellow amateur radio operators in mind, there are all kinds of devices that need to use a COM port to access them from your PC. Using this quick guide you can easily find where to look to get the right COM port number for your situation.

Solving “An error happened while reading data from the provider” When Connecting to SQL Server From Visual Studio 2019

Introduction

Recently I was working on a SQL Server Analysis Services Tabular project in Visual Studio 2019. In attempting to connect to a SQL Server database to import data, I got the following error.

An error happened while reading data from the provider: 'Could not load file or assembly 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)'

Let’s see the steps I went through to get to this point…

Reproducing the Error

Start by opening your SSAS Tabular project in Visual Studio 2019. In the Tabular Model Explorer, right click on Data Sources, then pick New Data Source.

In the Get Data window, pick Database, then “SQL Server database” and click Connect.

In the “SQL Server database” window, enter the name of the server, for example “localhost”. Click OK.

In the credential window, with the default of Windows credential, use Impersonate Account for the Impersonation Mode.

Enter your credentials and click OK.

You get a dialog titled “Unable to connect“.

You get this, despite knowing you’ve entered your credentials correctly. I actually found the solution in a PowerBI issue on Stack Overflow, they were having a similar problem.

The Solution

The solution, as it turned out, worked for both PowerBI and Visual Studio 2019. Simply run Visual Studio 2019 in administrator mode.

In the pic above, I have VS2019 in my toolbar. I right clicked on the icon, then in the menu right clicked on Visual Studio 2019. I then picked the Run as administrator option.

Following the steps in the Reproducing… section above I entered my credentials and clicked OK.

After clicking on OK, instead of the error I got an Encryption Support error, that it was unable to connect using an encrypted connection. I believe that was because, in my case, Visual Studio and SQL Server are both on the same box, in a development VM. As such, I’d not bothered with the overhead of setting up encrypted connection support in SQL Server. In this case I was OK with that so just clicked OK.

Now the Navigator window appeared, and I was able pick a database to import from.

Conclusion

I hope this simple fix works for you. I know I spent forever looking for an answer, and was lucky that trying the same solution that worked for PowerBI, running in admin mode, also worked for Visual Studio 2019.

Expanding The Size of a Hyper-V Virtual Disk

Introduction

There are tasks that we all do, but rarely. It’s helpful to have a reference to go back to.

Expanding the size of a Virtual Hard Disk, or VHDX file, is one of those. I use Hyper-V quite a bit to create virtual machines for testing, development, and the like. Every so often though I’ll underestimate the amount of space I’ll need for a machine.

As it turns out expanding the drive size isn’t terribly difficult, but there’s quite a few steps involved. This post will server as a reminder to myself, and hopefully guide others, in expanding the size of a VM drive.

I’ll break this into two parts. In the first half, we’ll see how to expand the drive within Hyper-V. This will expand the VHDX file to a new larger size.

In the second half, we’ll go into the Windows running in the VM to tell it to use the newly expanded space.

Expanding the Drive in Hyper-V

Begin by opening Hyper-V. In the Hyper-V manager, click on Edit Disk in the Actions.

This will open the Edit Virtual Hard Disk Wizard.

If this is the first time you’ve run the wizard, you’ll see a welcoming screen. If you see this, I’d suggest clicking on “Do not show this page again” and clicking Next.

Now use the Browse… button to locate the VHDX file you wish to modify. Once you’ve done that, click Next.

Now we’ll select the action, in this case we’ll pick the Expand option and click Next.

Now we’ll enter a new size for the drive. It shows the current size as 250 GB, so I’ve entered 500 so I can double the size. Obviously you’ll enter a size appropriate to your needs.

Once done, click Next.

On the final page of the wizard it shows what is about to happen. It lists the name of the VHDX file we’re working on, what the action is (Expand), and what the size will be of the new drive.

Just click Finish and the VHDX file will be updated.

Accessing The Expanded Space in Windows

In this example we’ll be using Windows 10 inside our Virtual Machine. Go ahead and start, then connect to your Windows 10 Virtual Machine.

If you go into File Explorer you’ll see something interesting.

Even though we expanded the VHDX to 500 GB, our virtual machine still thinks the C drive is 249 GB.

What we need to do is expand the already existing drive into the newly allocated space.

In the Windows 10 menu, go down to Windows Administrative Tools, then pick Computer Management.

The Computer Management window has a tree on the left. If the Storage tree is not expanded, do so and click on the Disk Management branch.

In the screen capture above, you can see the orange arrow is pointing to the existing C drive area. To the right of that a green arrow points to the newly added but still unallocated space.

Right click in the C: drive area, and in the menu that appears select Extend Volume…

The Extend Volume Wizard now appears, just click Next to proceed past the welcome screen.

By default the wizard will put the only unallocated partition in the selected area, but if you have more than one unallocated partition you can select a different one.

At the bottom, the “Total volume size will” show the total amount of space on the new drive, once the unallocated space has been added.

The next line shows the maximum space in the unallocated partition.

The final line allows you to select the total amount of space to pull from the unallocated area. By default it is set to the max space in the unallocated area, but if for some reason you want to save some of that you can lower the amount.

In this case I’ll take the default options and click Next.

You’ve now reached the final screen of the wizard, just click Finish to have it do its work.

The Computer Management window now shows the expanded C drive. You can now close the Computer Management window.

If you go back to the File Explorer and refresh it, your C drive will now show the new size.

Conclusion

In this article, we expanded the size of a Hyper-V virtual hard disk (VHDX) that hosted a Windows 10 installation. As you saw, it was pretty simple to do, but did require a few steps.

Hopefully you’ll find this useful in working with your Hyper-V machines.

Working From Home – Permanently

Introduction

When the current COVID crisis hit, there were a lot of posts and questions about working from home. But of late I’m seeing an interesting trend of posts on social media from people who have been working from home, but were just told they’ll be working from home permanently. They will never return to the office, at least that of their current employer.

These folks have been “getting by” with temporary setups. Using a laptop on the kitchen table, or on a desk in the corner of the bedroom. Now that they’ve been told this will be a permanent situation, they are looking for suggestions and advice on how to setup a permanent home work area.

As someone who has worked from home for the majority of the last decade, I thought I’d share a few tips and tricks. Granted some of these may seem obvious, but since the questions are being asked I’m hopeful at least one or two of my suggestions may help the new breed of work-from-home people.

Some of these suggestions involve tech, but some also involve your daily workflow. Let’s get started!

Multiple Monitors

One of the best things you can do is have more than one monitor. Now granted, I went a bit over the top having a rack with six monitors, as you can see above.

In my case I do a lot of video recording and editing for all of my Pluralsight courses. In the big 32 inch monitor at the bottom center I hold the content I’m recording. In the lower right I put my notes that pertain to what I’m recording. The left side gets my recording software.

In the upper left I put my audio editing software. Upper right gets my web browser so I can quickly look things up that may arise as I record. Finally the upper middle is for miscellaneous stuff.

Having six monitors has increased my workflow as I don’t have to cycle through applications, everything is right there where I can see it.

I admit, most people don’t need this setup. However I would suggest at least two monitors, or even better three, as an ideal work setup.

If your main machine is a laptop you should have at least one external monitor port. You can get more through either an external GPU box (if your laptop supports it) or one of the many USB-to-Video adapters on the market.

Most monitors support multiple inputs, and you can use buttons on the monitor to swap between inputs (in my case, multiple laptops).

As an alternative to multiple monitors, I’m also seeing people using a 4K TV. The 4K resolution amounts to having four 1920×1080 monitors in a square. Using software like the Windows PowerToys you can easily snap an application to one of the four areas, or you can use the full area when you want to.

Racking Your Laptops

I use multiple laptops, as I work in multiple environments. I have a Lenovo P51 on the bottom, in the middle is my Apple MacBook. On top is another Lenovo that I am running Linux Kubuntu KDE Neon on.

My laptops are stacked on a wire shelf that I got from my local big box store. I like the wire rack as it helps with air flow around the computers.

I really like these shelves, they are affordable, easy to configure, and hold a lot of weight. My home office doubles as my “ham shack” (amateur radio), here’s a shot of the back wall and a little bit of the side.

The wire racks on the back wall hold my antique radios as well as some of my “antique” or classic computers like my Commodore 128 or the older “egg bowl” Mac. To the right of the Mac are my modern ham radios.

I use zip ties to hold each tower together so it winds up being a solid unit. Just be sure to have good, sturdy tables that hold a lot of weight.

Get A Good Keyboard

You are on your computer all day, and most laptop keyboards are not that great. (Although I do love the keyboard on my Lenovo P51). Using a bad keyboard can lead to many health issues with your hands. In addition, if you have multiple monitors using an external keyboard makes it much easier.

This keyboard is part of the Logitech line which (although it’s a bit hard to tell from my mediocre pic) does have a slight curve to it making it more ergonomic.

The big thing for me is the ability to Bluetooth connect it to multiple computers. This is connected to the three laptops you saw in a previous pic. I can just use the 1, 2, and 3 keys to quickly swap between computers (I use the buttons on the monitors buttons to swap inputs between the three laptops).

As someone who has suffered from hand issues, I find a regular mouse painful to use after a while. For years I’ve been a fan of the Logitech trackballs. I was amazed at how quickly I became used to them.

Pictured is a Logitech MX Ergo, which unfortunately can only pair to two computers so I have another older model trackball for use with the third machine.

You may wonder about the scrap of a yellow post it note over two of the keys. I work in PowerShell within VSCode a lot, and frequently use the F5 and F8 keys. I’m also one of those people who likes to work with the lights on very low, and with my old eyes distinguishing between the function keys can be difficult.

Using the little scrap of post it notes can make it easy for me to find my often used F5/F8 keys.

Use A Good Headset

Do you participate in online calls (Zoom, Skype, etc.) all day? Then for crying out loud, get a good headset!

It drives me nuts to be in meetings with people who use the built in mic and speakers on their laptop. These are NOT quality, and often sound like the person is in the bottom of a barrel. A very echo-ey barrel.

The wired earbuds some people use are a little better, but not by much. The microphone is tiny and comes across as very “tinny” for lack of a better word.

My headset of choice is the HyperX Cloud Stinger Core Wireless. You can get them from both Best Buy and Amazon, for about $80 (US currency). They have two big advantages over other headsets.

First, they are wireless. Drives me nuts to have a wire I can easily get tangled up in. Plus, and I admit this is a duh moment, I’ve stood up multiple times with the old wired headsets forgetting about the wire and jerking the headset off my head.

Second, and more important, is the muting. To mute my microphone, all I have to do is lift the boom up. That’s it, no having to fumble for a button on the headset. Just lift it up, it’s muted, lower it back down and people can hear me. It makes calls so much easier, I can hear people clearly, and they have clear audio of me.

They are so good I use them on a weekly Minecraft stream my friend Marc runs on YouTube. (I participate as ArcaneMining).

I will add, for recording my Pluralsight videos I use a Yeti podcaster microphone on a large boom arm. It gives excellent quality, however that is very much overkill (unless of course you are also recording Pluralsight videos).

Trust me, you will have a much better experience and the people you meet with will thank you. Plus they are at a price point that makes them affordable to most people.

Along with the headset also consider an external camera. While most laptop cameras are decent, I really get tired of looking up people’s noses during a call. You can place it on top of your external monitor for a much better view.

I’m fond of my Logitech C922, runs about $100 on Amazon, but there are many similar cameras of good quality.

Isolate Yourself

Now we’ll shift from tech to workflow related items. The first of these is to isolate yourself.

If you live alone this is easy, but if you have a bunch of people in your house it can be important to find a place you can isolate and have quiet time to think. Put your home office in a place where you can close the door, and make it understood when the door is closed to consider it a “do not disturb” sign.

I can understand there will be situations where you can’t isolate all day. But try to find set times where it’s clear to others in your household that you should be left alone. When the door is open, they are free to come in.

Not only will this make you more productive, but it will avoid embarrassing situations like a kid running through the background of a Zoom call in only their underwear.

Move

It’s important you take breaks through the day to move. To get up from your desk and walk around. I know personally I will get so focused on what I’m doing that time flies by, then I realize three hours have flown by without me moving from my chair. When I finally stand up, well my creaky old man body reminds me.

Use some kind of app or device to remind you on a regular basis to move. My Apple Watch will buzz every hour reminding me to stand up, and will even track how often I actually do it.

There are also apps for the various brands of smart phones, plus I’d imagine many freeware apps for your computer. If nothing else get a good old fashioned timer from the kitchen section of your favorite big box store.

Another advantage to the wireless headphones I mentioned earlier in this post is the ability to get up and move during an audio call.

Have Laptop Will Travel

An advantage of having a laptop for your main computer is it’s (surprise) portable!

Finding time to work at alternate locations can help keep work enjoyable. Perhaps once a week, take your laptop down to your local coffee shop (assuming it’s open), sit and work there with a cup of coffee for a bit. (Hint, good earbuds and music on your phone can help drown out the other noisy patrons.)

Go outside! I often carry my laptop onto my back porch to enjoy fresh air and sunshine while I work. There’s also a nice park nearby, I sometimes work from there using my phone as a Wi-Fi hotspot.

Don’t think you need to stay all day. Sometimes just two or three hours can be energizing and very productive.

Of course this assumes you aren’t doing a meeting, but most of us have time in the day or week with no meetings scheduled.

And because you are the go doesn’t mean you have to give up multiple monitors. If you have an iPad, and a modern MacBook the sidecar feature will let you use the iPad as a second monitor.

If you are on Windows, or an older MacBook, there is a nice piece of software called Duet Display that will let you connect your iPad to your computer (via the USB cable) and use it as an external monitor.

If your tablet is Android based, Splashtop offers a free piece of software called Wired XDisplay for both Windows and Mac that enables your Android tablet as an external display.

Set Boundaries

Of all the pieces of advice I can offer, this by far is the most important.

First, set boundaries with others in your household. Make it clear when you are working from home, you are WORKING. Just because you are at the house doesn’t mean you can “go ahead and do some laundry”, cut the grass, dust, make dinner, or any of the other typical household chores.

This goes for you, as well. When you work, focus on your work. When you are not working is the time for the other chores.

It’s also important to set boundaries with coworkers. Make sure they understand when you are available for meetings and when you shouldn’t be disturbed. Use your company work calendar to indicate when you are available for meetings.

They also need to understand you can’t just hop up on a moments notice to come into the office for “a quick meeting”.

Don’t be afraid to say NO! Push back for phone / online meetings. I used to work for a company that let us work from home two days a week. Even though I had it on my work calendar I was constantly having project managers schedule two hour “in person” meetings on my work from home days.

I finally started pushing back, saying I wouldn’t be in the office that day but give me a conference call line and I’d be on the call. Of course they’d say “we really want you here”.

I’d then ask “what value is provided from me being there versus on the phone”? “How will the meeting be different or less productive if I’m on a call?”

If they couldn’t provide a good answer, a really good answer, I’d tell them I’ll be there on the phone call talk to ya then. (Of course I also had a great boss who supported me, you may not be so lucky.)

Finally, set boundaries with your time. Designate the hours you will work each day. When you are working, make it clear to your family you aren’t available to do household tasks.

When it’s outside work hours, make it clear to your coworkers you are off. It is far too easy to wind up working far more hours than you normally would when working in an office. When (for example) 5 pm hits get up and walk away from your computer, and don’t go back until the next morning.

Conclusion

In this post I’ve shared some tips for people who are moving to a work from home situation based on my years of experience doing just that. I really love working from home, and I think you will as well if you setup a comfortable environment, with the right equipment, and having set boundaries with your family and co-workers.

Formatting A Drive as exFAT on Windows, macOS and Linux

Introduction

In my previous blog post, Sharing a Drive Between Windows, macOS and Linux, I described how to setup the three operating systems to read a drive that had been formatted as exFAT. The exFAT format is readable by all three, and making it easy to share files between different operating systems.

A natural question that follows is, “how do I format a drive as exFAT?”

In this article I’ll show how to format an external drive as exFAT. I’ll be using an 8gb thumb drive, but I’ve used this technique with both thumb drives as well as the larger external multi-terabyte hard drives.

Windows

Windows is the easiest of the three to format a drive for exFAT. First, insert the drive into a USB port. This will typically open the Windows File Explorer, but if not, open it.

Now right click on the drive letter for the USB drive, and click on Format. The format dialog will appear.

In the second drop down you can pick the file system. Use it to select exFAT. You can also enter a new volume label if you want. Simply click the Start button to kick off the format process.

You will of course get a warning that all the data on the drive will be lost, simply click on OK to proceed.

Once done Windows will let you know. Just click OK and your drive is ready to use.

Apple macOS

There’s a few more steps to formatting a drive to exFAT in macOS, but it’s still pretty simple. Start by opening Finder, then go to the Applications. In Applications, open the Utilities folder.

Inside the Utilities, launch the Disk Utility. If you’ve not done so, connect the USB drive you want to format as exFAT.

On the left side of the Disk Utility is a list of drives, click on the USB drive in the list.

Above the drive info area are a series of command buttons. Click on the Erase button. Note you need to click on the icon, not the Erase label.

In the dialog that appears, you can change the label if you wish. The important box is the Format one. You can use the blue arrow to bring up the list, and change it to exFAT.

Once exFAT is selected, you can click the Erase button on the lower right.

Once done, macOS will let you know. Just click Done, and the drive will be ready for you to use.

I’ve used this technique with macOS versions from High Sierra onward.

Linux

For this section, I’m using screen shots from my Kubuntu 20.10 computer. The techniques will work with most Ubuntu/Debian based installs. To make it more portable to other versions, we’ll do most of it using the command line.

Note, these instructions assume you’ve already followed the instructions in my previous blog post, and installed the exFAT utilities.

Start by opening up a terminal window, and entering the following command:

df

Your output will look something like this:

Filesystem     1K-blocks     Used Available Use% Mounted on
tmpfs             805596     1752    803844   1% /run
/dev/sda2      244568380 18388480 213686844   8% /
tmpfs            4027972      128   4027844   1% /dev/shm
tmpfs               5120        4      5116   1% /run/lock
tmpfs               4096        0      4096   0% /sys/fs/cgroup
/dev/sda1         523248     7984    515264   2% /boot/efi
tmpfs             805592      108    805484   1% /run/user/1000
/dev/sdb1        7815648       96   7815552   1% /media/arcanecode/4ECB-E340

For this exercise, I’ll be using the /dev/sdb1 drive which is my 8gb thumb drive.

Before we can proceed, we’ll have to unmount the drive. The command is simple.

sudo umount /dev/sdb1

Now that the drive has been unmounted, we can format it using the mkfs utility.

sudo mkfs.exfat /dev/sdb1

Once formatting is complete, we can check its status using the fsck command.

sudo fsck /dev/sdb1

Your output will vary depending on the drive you formatted, but it will resemble something like this:

fsck from util-linux 2.36
exfatfsck 1.3.0
Checking file system on /dev/sdb1.
File system version           1.0
Sector size                 512 bytes
Cluster size                 32 KB
Volume size                7633 MB
Used space                 3041 KB
Available space            7631 MB
Totally 1 directories and 3 files.
File system checking finished. No errors found.

A benefit of using fsck is that will also remount the drive for you, making it ready to use.

You can verify it again using your systems file explorer. Here I’m using Dolphin, the explorer built into Kubuntu.

Navigate to the drive, right click on it, and pick Properties.

In the properties window it will show you the file system. As you can see, it has been formatted to exFAT.

Conclusion

In this post we saw how to format a drive for exFAT on three operating systems. You can now format a drive using any of the OS’s, and be able to use it across all of them.

Sharing a Drive Between Windows, macOS and Linux

I have a lot of computers, on which I use a variety of operating systems. Some run Windows 10, my Apple macBooks all run macOS, and on others I have a variety of Linux distros, primarily Ubuntu based.

I would like the ability to share external drives, such as thumb drives or external SSD drives, between them. To get that compatibility across OS’s, I need to format those drives in a file format called exFAT.

exFAT is a replacement for the older FAT32, but has the benefits of other file systems such as NTFS. I can have long file names, and store files bigger than four gigabytes in size to name a few.

Windows and macOS both support exFAT out of the box. I can just plug in an exFAT drive into them, and both will let me read and write to them. (Note that not all drives come formatted as exFAT, you may need to reformat them to the exFAT system). Linux, however is another story.

To allow Linux to read an exFAT drive you need to install the exfat-utils utility. On Ubuntu based distros it’s pretty easy, just open up a terminal and enter the following command, all on one line.

sudo apt-get install exfat-fuse exfat-utils

For other distros you can use their native installer, such as yum, to install the exfat-utils. After that you can simply plug an exFAT thumb drive or SSD into your Linux box and it will know how to read and write to the drive.