barelat.blogg.se

Virtualbox increase disk size ubuntu command line
Virtualbox increase disk size ubuntu command line







virtualbox increase disk size ubuntu command line
  1. #Virtualbox increase disk size ubuntu command line how to
  2. #Virtualbox increase disk size ubuntu command line install
  3. #Virtualbox increase disk size ubuntu command line free

The output of the above command will display the size of every file in the directory (Figure 5).įigure 5: The output of the du command on a specific directory. If I want to find out how much space is used by that particular directory, I’d issue the command: du -h /media/jack/HALEY/VIRTUALBOX That directory is /media/jack/HALEY/VIRTUALBOX. Let’s say I have a directory containing virtual machine files on my machine. Because of this, you’ll want to know the names of directories to be checked. The du command is quite different to the df command, in that it reports on directories and not drives.

virtualbox increase disk size ubuntu command line

As you might expect, that stands for disk usage.

virtualbox increase disk size ubuntu command line

Now the output makes more sense (Figure 4).įigure 4: We now know the source of our disk usage. The only caveat here is that we don’t know the source of the output, so we’d want to include source like so: df -H -output=source,size,used,avail The output of this command is quite easy to read (Figure 3).įigure 3: Specifying what output to display for our drives. The command for this would be: df -H -output=size,used,avail Let’s display the output of all our drives, showing only the size, used, and avail (or availability) fields. Pcent - percent of used space, divided by total size You can also limit the reported fields shown in the df output. The output will be limited to that one drive (Figure 2).įigure 2: How much space is on one particular drive? To do that, issue the command: df -H /dev/sda1 Let’s take a look at how much space has been used up on our primary drive, located at /dev/sda1. What if your list of drives is exceedingly long and you just want to view the space used on a single drive? With df, that is possible. The output of df -H will report how much space is used, available, percentage used, and the mount point of every disk attached to your system (Figure 1).įigure 1: The output of df -H on my Elementary OS system. The -H switch is for human-readable format. This command has a few switches but, for basic reporting, you really only need one. To this day, df is my go-to command for this task.

virtualbox increase disk size ubuntu command line

It’s very simple in both usage and reporting. The df command is the tool I first used to discover drive space on Linux, way back in the 1990s. With that said, let’s take a look at the tools. The commands used are agnostic to where a drive is plugged in they only care that the drive is mounted and visible to the operating system. On my testing system, there are a number of attached drives (both internal and external). The good news is these command-line tools are readily available for every Linux distribution. I’ll be using Elementary OS, which also includes a GUI option, but we’re going to limit ourselves to the command line. In this article, I’ll demonstrate these tools. In fact, you have two very easy-to-use options at the ready. All the necessary bits are already in place to help you find out exactly how much space remains on your drives.

#Virtualbox increase disk size ubuntu command line install

But what if you’re looking at a headless server, with no GUI? Do you need to install tools for the task? The answer is a resounding no.

#Virtualbox increase disk size ubuntu command line how to

Quick question: How much space do you have left on your drives? A little or a lot? Follow up question: Do you know how to find out? If you happen to use a GUI desktop (e.g., GNOME, KDE, Mate, Pantheon, etc.), the task is probably pretty simple.

#Virtualbox increase disk size ubuntu command line free

For more great SysAdmin tips and techniques check out our free intro to Linux course. This is a classic article written by Jack Wallen from the  archives.









Virtualbox increase disk size ubuntu command line