I would like to install Linux on PC through USB flash drive. But there is already old operating system. I want to clean HDD using command line. In windows, I just use
diskpart > list disk > select disk > clean. Is there any way to clean HDD as easy as Windows does?
It is not necessary to completely wipe a Hard Drive before installing Linux over it. As it alludes to in the comments above, it is enough to tell the Installer to use the whole disk and it will totally replace Windows with Linux.
If, however, you are concerned with security and any Windows files being recovered either you can use Linux commands such as those shown at http://how-to.wikia.com/wiki/How_to_wipe_a_hard_drive_clean_in_Linux or use a seperate program like DBAN - https://dban.org/
To totally obliterate a Hard Disk Drive you need to run these alternatives several times. ---Although some people say that the only really secure method of dealing with a HDD is to physically destroy it. Sledge hammer anyone?
Boot from your installation media and usually there is an option to run a command line prompt. Recovery CDs like SystemRescueCd can also be used, but I do believe most installation CDs do support this. Alternatively, you can use the "try without installing" option that many live CDs have.
Once you have your terminal running, you can use the
shred command to erase the partition you want.
shred -vzn 3 <device_here> will overwrite your files 3 times with random numbers.
This answer on AskUbuntu goes in some more details on how to use shred.
You can also use Gparted. I haven't used Gparted in a while but I found this article explains that explains it well.
If you are only concerned with the files from the old OS somehow interfering with the new OS I suggest using the default partitioning that the installer suggest. While it will not securely erase your files, it will threat the disk as empty space and will install the new OS on top of it. The new OS will have no knowledge of the old files, but someone with the right knowledge and tools might be able to recover some of those files if they have access to your hard drive.