Diskpart – Utility to Format and Clean your Computer


Diskpart is integrated into Windows since Windows 7 and is a utility that will help us manage all our disks. With its own command interpreter and thanks to its wide variety of options. we will be able to carry out all the necessary tasks to make changes to our PC’s disks, such as migrating the information to an SSD. In addition, we will leave you some examples of use so that making any changes will be much easier.

If we install a new disk drive on our PC, Diskpart will help us to prepare the new drive for use, we can also modify the existing ones or remove them from a disk that we already have installed on our PC. We simply have to run the utility and type some command lines.


To be able to use this utility, our Windows user must be Administrator or belong to the local administrator’s group. If this is not a problem, we can type in the search field diskpart to start the shell. To open the Windows search, we can press the Windows key + S or click on the magnifying glass and type it directly.

Once the command interpreter is open, we only have to type the command to perform the necessary action. If, for example, we write help, it will show us all the available commands. Next, we will tell you what each one is used for.

Functionalities of Diskpart

Diskpart keys/ command lines

Active :

This command applies only to the MBR system partitions. When it is executed, it marks the MBR partition that we have selected as an active partition. To run it, we previously select an MBR partition and simply type active at the command prompt.

Add :

With this command, we will be able to reflect the simple volume that we must select previously, on the disk specified as a parameter. For example, if we have disk 1 and partition 2 selected, we can mirror disk 2 to partition 2 of disk 1 simply by typing add disk 2.

Assign :

It allows us to assign a drive letter or a mount point to the volume that we have selected. We only have to write assign letter = t to assign the letter t to the volume that we have previously selected, if we do not write any drive letter or mount point, it will assign the next available drive letter.

Attach vdisk

Its function is to attach a virtual hard disk (VHD) so that it appears like a local disk drive. Previously we must have selected a virtual hard disk and we will associate it by writing attach vdisk, if we want to mount it as a read-only unit we can add the read-only parameter.

Attributes :

Shows us, sets, or deletes attributes of disks or volumes. For disks, we can use set to set the attribute, clear to clear the attribute and readonly to specify that it is read-only.

For volumes, we have the same set, clear and read-only. but in addition, hidden is added to specify that it is hidden, nodefaultdriveletter with this, we say that it does not receive a drive letter by default and shadowcopy to specify that it is a snapshot volume.

To see the attributes of a disk, just write attributes disk, if we want the disk to be read-only, we add set readonly.

Automount :

Enable or disable automount on a basic or dynamic volume. To enable it we will write automount enable, or automount disable to disable it.

Break :

It divides the selected volume into two simple volumes. To use it on disk 0 we must write break disk = 0.

Clean :

It will remove all the partition or volume formats from a disk that we have previously selected. We just run clean all and all the data on the disk will be erased.

Compact vdisk :

It allows us to reduce the size of a dynamically expanding virtual disk. These dynamic expansion disks increase in size as needed.

But do not reduce in size, taking up more physical space, when files are deleted. When we have already selected a dynamically expanding virtual disk.

We run compact vdisk to reduce its size. This command is only valid on Windows Server 2012 onwards.

Convert :

Converts dynamic disks into basic ones, it also converts basic disks into dynamic ones. It can convert MBR disk to GPT and its reverse operation, convert GPT disk to MBR. To perform the necessary operation we will write the convert command followed by basic or dynamic if we want to convert a dynamic disk into basic or a basic disk into dynamic, we will write convert and then GPT or MBR if what we want is to convert an MBR disk into GPT or a disk GPT in MBR.

Create :

It allows us to create partitions on disks, we can also create volumes on one or more disks or create a VHD virtual hard disk. To create a partition, the attributes can be efi, extended, logical, msr OR primary we will write create partition and the attribute followed by the size.

For example, if we want to create a 1 GB primary partition we write create partition primary size = 1000 . To create a volume we have the options of doing raid, simple, stripe or mirror , we must also write create volume simple size = 1000 disk = 2 to create a simple 1GB volume on disk 2, in the case of a raid we should indicate in disk = the number of disks to create the raid separated by commas, for example create volume raid size = 1000 disk = 1,2,3 to create a raid with those disks.

Delete :

It will allow us to delete a volume or a partition of a disk, it is also capable of eliminating a dynamic disk from the list of disks. To delete a previously selected disk, partition or volume we must write delete disk, partition or volume.

Detach vDisk :

It is used so that the virtual hard disk that we select as one more disk unit on our computer no longer appears. It’s as simple as typing detach vdisk.

Detail :

It will show us information about a disk, partition, volume or virtual hard disk, as we have selected. To show us the information we will write detail followed by disk, partition, volume or vdisk.

Exit :

It allows us to exit the command interpreter, just type it and press enter to close.

Expand vdisk

Expand vdisk expands the size of the virtual hard disk to the new size that we specify, to perform this task and increase the size of the disk, for example, to 2 GB we will write expand vdisk maximum = 2000.

Extend :

Extend allows you to extend a volume or partition with the available unallocated free space of any disk. We can specify the size to extend or use all the contiguous available space on the disk. If we want to extend all the available size on disk two, we write in the interpreter extend disk = 2 by not specifying size with size = n it will use all the contiguous space available on disk 2.

Filesystems :

Shows information about the file system that we currently have of the volume that we have selected. We will only have to write filesystems when we have selected a volume. since it does not work with disks or partitions.

Format :

Format assigns a format to a disk to be able to use it with Windows systems. It also has several parameters to perform the correct format.

FS =we specify the type of format 
LABEL =to write the name of the label
QUICKperforms a quick format on the volume
COMPRESSIt is only valid on NTFS, it compresses all files created on the volume
OVERRIDEif necessary, unmount the file system to perform the format
NOWAITwill not show the percentage while formatting and can use other commands while

If for example we want to format with label in NTFS and fast we can write format fs = NTFS label = LABEL quick, remember that you must select the volume to be formatted before executing this command.

Checkout: Speed Up your Windows 10


It works with Windows Server 2012 and later, it is used to assign the GPT attribute to the active partition at that moment.

Help :

It gives us help on the Diskpart commands, as we gave as an example at the beginning, we write help in the interpreter and all the available commands will appear, to have help with a specific command, we write help command. For example, if we want help with format syntax, we type help format, and it will show us the information about this command.

Import :

We import a snapshot from a metadata file. These commands are used more in business settings and we won’t go into much detail.

Inactive :

We marks the selected system partition as inactive, this must be done on a disk with a master boot record or MBR. We just type inactive to make it work.

List :

it will show us a list with information about disks, partitions, volumes or virtual disks, according to the added parameter. To show this information, we write list followed by disk for the list of disks, partition for partitions, volume for a list of volumes and with vdisk we will see the list of virtual disks.

Merge vdisk :

Merge vdisk allows us to combine a secondary virtual hard disk with its corresponding primary virtual disk, adopting the corresponding modifications. This command is only available in the Server version of Windows from 2012.

Offline :

Changes the online status of a disc to offline mode, basically like ejecting a USB drive. We write offline disk or volume depending on whether we want to change a disk or volume to offline.

Online :

Online offers us the opposite of offline, offline disk changes to online status. As before, we write online disk or volume to change the state from offline to online a disk or volume that we have selected.

Recover :

Recover helps us to recover the disks from a damaged raid, it also resynchronizes the volumes that are mirrored or with parity data. We simply execute recover which will only work if we have selected a disk from a raid. Otherwise, it will tell us that the operation has been completed without performing any task.

Rem :

Add comments to a diskpart script. We write rem comment to specify, for example, what this script will do.

Remove :

Removes the drive letter or mount point from a volume. We can use the letter = a parameters to specify the drive letter to remove, mount = path and thus say which mount point we want to unmount, all to remove everything at once or dismount that can be used together with all or if they have previously been removed all letters and paths from the volume.


Repair helps to repair a damaged Raid-5 volume and allows you to replace the damaged Raid-5 volume with a properly functioning one. It only applies to Windows Server 2012 onwards.

Rescan :

Rescan searches for new disks that have been connected to the computer. We simply write rescan and it will immediately check for new connected units.

Retain :

Retain prepare a dynamic volume to use as a boot or system disk. This command works simply by executing retain at the shell, but in order to execute it, you need to select a dynamic simple volume.

San :

Sets the storage area network (SAN) policy for the operating system.

Select :

Select allows us to select the disk, partition, volume or virtual disk by typing select disk, partition, volume or vdisk respectively. It is necessary to correctly execute most of the commands, previously select the disk, partition, volume or virtual disk with which we want to work.

Desired =

Specifies the amount in MB that we want to reduce, if we do not specify the amount it will be reduced according to the maximum amount of free space left on that volume.

Minimum = 

Specifies the minimum number of MB to remove to reduce the volume.


Querymax gives us the maximum byte that can be removed, basically the remaining free space of that volume to get an idea of ​​how much we can reduce the volume.


Nowait allows us to return to the command interpreter before the operation ends, so while it is still in progress we can continue using the interpreter.


UniqueID allows us to show or change, of the disk we have selected, the identifier of the partition table (GUID) or the signature of the master boot record (MBR). If we want to see the identifier of the disk that we have selected, we must write uniqueid disk, to change it we will write uniqueid disk.

Format a Drive using Diskpart

These are all the commands available to perform tasks with diskpart, although some will only work if you are in a business environment, the rest can be useful if we want to make changes to a new disk or removable drive without the need for additional software, simply by typing some commands we will have the new unit ready to go.

Create Icons to Customize Folders in Windows 10

Initially, the icons are images that replace an object or want to transmit some type of information, this option is taken in the background for Windows 10 users without understanding that the folders can be customized.

In the same way, it must be taken into account that the icons can be original and serve to give the personalization touch to the folders on the desktop.

Having these personalized icons on your computer can be used to protect information. Since, if someone enters your device and is guided by the icon, they will think that within that folder there is information regarding it, while the content may be different.

Discover How to Create Icons for Folders in Windows 10

It is very easy to create the icons for the folders in Windows 10, since this way you can give it your touch of originality.

Custom Icons for Folders

You just have to have a little time. Here we will show you step by step the instructions you must follow in order to customize the icons of your folders.

The icons can be edited with Paint, Photoshop and many other programs. In this case, we will explain how to customize the icons with the Adobe program. With this program, you can create icons with transparencies.

  1. First you must open Photoshop and select “new file”.
  2. Set the dimensions of 300 × 300 pixels.
  3. Then, a “new file” must be opened and you can start using the tools to draw like the pencil, or you can select any of the figures that appear there to give the icon originality.
  4. When you carry out these steps, you must click on “image” to restore its size and “select the dimensions”.
  5. So that it looks like an icon, which is 32 × 32.
  6. Then, save your customization in “file” “save as” and select the BMP format together with the .ico extension.
  7. This way it will be saved in icon mode.

These steps are the ones you must follow in case you want to make the icon on your own. But you can also select an image from the internet, photos of yourself or logos. As long as it is a totally square image.

see: How to use Photoshop as a photo editor

Remember that the images you select must be saved in .ico format in order to customize the folders.

Set Custom Icon in Windows 10 Folder

After following all the steps and having your icon ready, you can set it in the folder to customize it.

  1. You just have to select the folder, left-click on “properties” to configure it.
  2. Then you must select the tab “customize” then select where it says “change the icon” in the option “folder icons.
  3. By selecting this option you will see several icons but you will not find the one you created.
  4. For this reason, you must click on “browse” to locate the icon in the folder that saved it.
  5. Then, you must select the option “accept” and that’s it.

In this way, you open your Windows 10 folder with the icon that you originally created.

See: Defragmenting the Hard Drive for more Space

By following all the recommendations, you will know how to create your own icons and how to set them in a personalized way in the Windows 10 folder.

It should be noted that there are several programs with which you can create icons such as:

You can create icons with your preferred program. In this case, we will explain how to handle Photoshop.

In short, setting an icon in your folder is a simple procedure.

You just have to make sure you follow the steps that we explain here correctly so that you get a good result.

Also see : How to password protect a folder

In addition, this way you will be able to give a different touch to the folders on your computer.

Finally, if you have a little time and dedicate yourself with enthusiasm to creating your own icons.

You can restore each of the folders on your desktop. In this way it will be totally personalized, giving it a touch of originality.

[Watch] Creating Icons for Folders using Photoshop CC

Finally, we hope this article has helped you. We would like to know Do you know another method to create icons for folders in Windows 10? Leave us your answer in the comments.

Defragmenting the Hard Drive

Today we are going to talk about defragmenting the hard drive in Windows 10. It is an operation that is sometimes necessary to put an order in the mechanical hard drives that you usually write and rewrite regularly. Since operating systems such as Windows tend to leave fragments on them that over time can slow them down.

We are going to start by explaining what defragmenting the hard disk is and what it is for, mentioning exactly what types of disk it has to be done on. Then we will guide you through the process to defragment the hard drive of your Windows 10 computer.

Hard Drive Fragmentation

The files inside your computer are not complete pieces in themselves. Since a video, a photo or any other file is made up of small fragments that are saved on your hard drive.

Windows knows where they are and how to locate them, but as you use the hard disk writing and deleting files.

It may not always be able to sort them all correctly in close areas of the disk

This disorder makes the system have to work harder to find the fragments of files that may have been scattered on the disk.

Causing little by little and with the passage of time, the speed of the entire computer can suffer.

Defragmenting the Hard Drive

In this way, the team becomes less agile and may take longer to do some tasks.

This phenomenon is called fragmentation, and it is inherent in the file systems used on mechanical hard drives.

Defragmentation makes your computer go slower. its useful life is reduced, or there is more space occupied than it should because of those fragments that are left in different areas of the disk.

Therefore, defragmentation of storage drives is the task with which files are reorganized on hard drives. This has some advantages, such as:

  • Make the computer go faster by having the fragments of the files organized and not having to search for them.
  • Reclaim some hard drive space after tidying up.
  • Get more out of the useful life of a hard drive, since sometimes if it goes bad we are likely to decide to buy another when the solution is much easier.

This happens only in mechanical hard drives or HDDs, while one of the advantages of solid-state drives or SSDs is that they do not suffer from fragmentation.

Related: use these Linux Commands as shortcuts which save lot of your time and money

This means that there is no need to defragment the SSDs.

In addition, other operating systems such as macOS do not tend to fragment mechanical disks as much, so it is not necessary to defragment hard disks on them either.

How to Defragment the Hard Drive in Windows 10

To enter the defragment application:

  • Press the Windows 10 Start button
  • In the search bar type defragment.
  • When you do, click on the Defragment and optimize drives application that will appear as the main search result.
  • You will go directly to the application to defragment the hard disk.

There is a second longer method to go to the defrag application.

  • To do this you have to be in Windows File Explorer
  • And, right-click on one of the disk drives.
  • In the pop-up menu, click the Properties option.

Once in the hard disk properties, first choose the Tools tab

  1. Enter the tools related to controlling the hard disk.
  2. In them, go to the Optimize and defragment drive box
  3. Press the Optimize button.
  4. You will go to the defragmentation application, only with a longer path than looking for it directly in the start menu.

Once the defragment application is open, the first thing you have to do is:

  1.  Click on the hard disk you want to defragment.
  2. Then, click on the Analyze button to first know what the state of the disk is.
  3. The application will show you the status of the disk in the Current Status column.

Disk Defragmentation & Drive Optimization as Fast As Possible

If the result does not convince you, click on the Optimize button to proceed to defragment the hard drive you have and voila, the program will automatically start the defragmentation process.

Linux Commands

Linux Commands

Want to speed up your work? You can use these Linux Commands as shortcuts which saves lot of yours time and money.

See in this article a list of Linux Commands.

Linux Commands

List of Most used Linux Commands

In routine maintenance, commands are used in moments of monitoring and (or) urgency:

  • ls : List all files in the directory
  • df : Shows the amount of space used on the hard drive
  • top : Shows memory usage
  • cd : Access a specific folder (directory)
  • mkdir : Create a directory
  • rm : Removes a file / directory
  • cat : Open a file
  • vi : Opens the vi editor(read viai ) to edit / create files

Control and Access Commands

  • exit : Log out, ie the shell (more help by typing man sh or man csh )
  • logout : Log out , that is, end the current session, but only in the C shell and bash shell
  • passwd : Changing our user’s password (logged in user)
  • rlogin : Log in securely to another Unix / Linux system
  • ssh : Secure session, comes from a secure shell, and allows us to login to a remote server using the ssh protocol
  • slogin : Safe version of rlogin
  • yppasswd : Changing our user’s password in the yellow pages

Communications Commands

  • mail : Send and receive emails
  • mesg : Allow or deny terminal messages and talk requests
  • pine : Another way to send and receive emails, a quick and practical tool
  • talk : Talk to other users who are currently logged in
  • write : Write to other users who are currently logged in

Help and Documentation Commands

  • apropos : Finds commands by keyword search
  • find : Find files, such as: find. -name * .txt -print , for searching text files from the current directory
  • info : Opens the information explorer
  • man : Very complete manual, searches for information about all the commands we need to know, such as man find
  • whatis : Describes what a given command is / does
  • whereis : Find the help page (man page), source code, or binary files for a given program

Text Editing Commands

  • emacs : screen-oriented text editor
  • pico : screen-oriented text editor, also called nano
  • sed : stream-oriented text editor
  • vi : Full-screen text editor
  • vim : Full-screen text editor improved (vi improved)

Files and Directories Management Commands

  • cd : Change current directory, such as cd directory, cd .., cd /
  • chmod : Change the protection of a file or directory, such as chmod 777, similar to the MS-DOS attrib
  • chown : Changing the owner or group of a file or directory, comes from change owner
  • chgrp : Change the group of a file or directory
  • cmp : Compare two files
  • comm : Select or reject lines common to two selected files
  • cp : Copies files, such as MS-DOS copy
  • crypt : Encrypt or Decrypt files (CCWF only)
  • diff : Compare the contents of two ASCII files
  • file : Determines the file type
  • grep : Searches for a file by a pattern, being a very useful and used filter, for example a cat a.txt | grep hello will show us only the lines in the a.txt file that contain the word “hello”
  • gzip : Compress or expand file
  • ln : Create a link to a file
  • ls : List the contents of a directory, similar to the dir command in MS-DOS
  • lsof : Lists open files, comes from list open files
  • mkdir : Create a directory, come from make directory ”
  • mv : Move or rename files or directories
  • pwd : Show us the entire path of the directory we are in at any given time, that is, a pathname
  • quota : Shows us disk usage and limits
  • rm : Deletes files, comes from remove, and is similar to the del command in MS-DOS, you have to be careful with the rm * command as it deletes everything without confirmation by default
  • rmdir : Delete directory, come from remove directory
  • stat : Shows the status of a file, useful to know for example the time and date of the last access to it
  • sync : Flush the file system buffers, synchronize the data on the disk with the memory, that is, write all the data present in the memory buffers to the disk
  • sort : Sort, join or compare text, which can be used to extract information from text files or even to sort data from other commands such as listing files sorted by name
  • tar : Create or extract files, often used as a backup or file compression program
  • tee : Copy the input to a standard output and other files
  • tr : Translate characters
  • umask : Change file protections
  • uncompress : Restores a compressed file
  • uniq : Report or delete repeated lines in a file
  • wc : Count lines, words and even characters in a file

Viewing or Printing Files

  • cat : Shows the contents of a file, like the MD-DOS type command, and is also used to concatenate files, such as making cat a.txt b.txt> c.txt ”to join the a.txtb file .txt in a single named c.txt
  • fold : Shorten, that is, fold long lines to fit the output device
  • head : Shows the first lines of a file, such as with head -10 to.txt, or used as a filter to show only the first x results of another command
  • lpq : Examine the printer spooling queue
  • lpr : Print a file
  • lprm : Remove jobs from the printer spooling queue
  • more : Displays the contents of a file, but only one screen at a time, or even output from other commands, such as ls | more
  • less : Works like more, but with fewer features, fewer features and potential uses
  • page : Works similarly to the more command, but displays the screens inverted to the more command
  • pr : Page a file for later printing
  • tail : Works in reverse to the head command, shows us the last lines of a file or even the output of another command, when used as a filter
  • zcat : Show us a compressed file
  • xv : Used to display, print or even manipulate images
  • gv : Displays ps and pdf files
  • xpdf : Display pdf files, use gv

File Transfer Commands

  • ftp : Comes from the file transfer protocol, and allows us, using the ftp file transfer protocol, to transfer files between multiple hosts on a network, such as to an ftp server to send or pull files
  • rsync : Quickly and flexibly synchronize data between two computers
  • scp : Safe version of rcp

News or Network Commands

  • netstat : Shows the network status
  • rsh : A shell on other UNIX systems
  • ssh : Safe version of rsh
  • nmap : Powerful port-scan, for viewing open ports on a given host
  • ifconfig : View the ips of our machine, among other functions related to ips
  • ping : Ping a given host, that is, send icmp packets to a given host and measure response times, among other things

Process Control Commands

  • bg : Puts a suspended process in the background
  • fg : Unlike the bg command, fg brings back a process to the foreground
  • jobs : Allows us to view jobs running, when we run an application in the background, we can see that job with this command, and end it with a kill -9% 1 command, if it is job number 1, for example
  • top : Lists the processes that most cpu use, useful to check which processes are causing an excessive use of memory, and how much decpu each one uses at any given time
  • ^ y : Suspend the process on the next input request
  • ^ z : Suspend the current process

State Information Commands

  • clock : Sets the processor time
  • date : Displays the date and time
  • df : Displays a summary of free disk space
  • du : Displays a summary of disk space usage
  • env : Displays environment variables
  • finger : Search for user information
  • history : Lists the last commands used, very useful to remember also which commands were used to do a certain action in the past or what was done at a given time
  • last : Indicates the last user login
  • lpq : Examine the queue spool
  • manpath : Shows the search path for the man command pages
  • printenv : Print the environment variables
  • ps : List the list of running processes, useful to know the pid of a process to send it down with the kill command, among other things
  • pwd : Show us the entire path of the directory we are in at any given time, that is, a pathname
  • set : Sets session variables, that is, shell, C shell, bash or ksh
  • spend : List ACITS UNIX costs to date
  • time Measures program execution time
  • uptime : Tell us how long the system has been functional, when it was turned on and its uptime
  • w : Shows us who is in the system or what command each job is executing
  • who : Show us who is logged in the system
  • whois : Internet domain directory service, allows us to know information about certain domains on the Internet, when a domain was registered, when it expires, etc.
  • whoami : Tell us who owns the shell

Word Processing Commands

  • abiword : Open Source Word Processor
  • addbib : Create or modify bibliographic databases
  • col : Reverses the filter to line feeds
  • diction : Identifies sentences with words
  • diffmk : Marks differences between files
  • dvips : Convert TeX DVI files to PostScript files
  • explain : Explains phrases found by the diction program
  • grap : Pic preprocessor for drawing graphs, used in elementary data analysis tasks
  • hyphen : Find words with hyphens
  • ispell : Check spelling interactively
  • latex : Formats text in LaTeX, which is based on TeX
  • pdfelatex : For LaTeX documents in pdf format
  • latex2html : Convert LaTeX to html
  • lookbib : Find bibliographic references
  • macref : Create a cross-reference listing nroff / troff macro files
  • ndx : Create an index page for a document
  • neqn : Formats mathematics with nroff
  • nroff : Formats text for simple display
  • pic : Produces simple images for troff input
  • psdit : Filters a troff output for Apple LaserWriter
  • ptx : Creates an indexed swap but not in CCWF
  • refer : Insert references from bibliographic databases
  • roffbib : Run off a bibliographic database
  • sortbib : Sort a bibliographic database
  • spell : Finds spelling errors
  • style : Analyzes the surface characteristics of a document
  • tbl : Formats tables for nroff / troff
  • tex : Formats text
  • tpic : Convert pic source files to TeX commands
  • wget : It allows us to download complete web pages, with all files, in an easy and non-interactive way, without requiring the user’s presence, respecting also the archivorobots.txt


  • html2ps : html to ps converter
  • latex2html : LaTeX to html converter
  • lynx : Web browser based on text mode, in other words, it is a web browser that allows us to open all types of pages by viewing only the text links, thus not seeing the images, and therefore it is quite fast, but requires practice to be handled
  • netscape : Netscape web browser
  • sitecopy : Application that allows us to maintain web sites easily and remotely
  • weblint : Syntax and html style checker

With that, we ended this article, which showed a good part of the most used Linux Commands.