What filesystem does unix use?

And what program can i use to make a unix format?

UNIX machine is connected to several file systems, each with its own i-list. One of those i-lists points to a special storage area, known as the root file system. The root file system contains the files for the operating system itself, and must be available at all times. Other file systems are removable. Removable file systems can be attached, or mounted, to the root file system. Typically, an empty directory is created on the root file system as a mount point, and a removable file system is attached there. When you issue a cd command to access the files and directories of a mounted removable file system, your file operations will be controlled through the i-list of the removable file system.

Each file system that is mounted on a UNIX machine is accessed through its own block special file. The information on each of the block special files is kept in a system database called the file system table, and is usually located in /etc/fstab. It includes information about the name of the device, the directory name under which it will be mounted, and the read and write privileges for the device. It is possible to mount a file system as "read-only," to prevent users from changing anything.

Example: Important File system Used by HP-UX

/hp-ux
The kernel program

/dev/
Where special files are kept

/bin/
Executable system utilities, like sh, cp, rm

/etc/
System configuration files and databases

/lib/
Operating system and programming libraries

/tmp/
System scratch files (all users can write here)

/lost+found/
Where the file system checker puts detached files

/usr/bin/
Additional user commands

/usr/include/
Standard system header files

/usr/lib/
More programming and system call libraries

/usr/local/
Typically a place where local utilities go

/usr/man
The manual pages are kept here

Also pls do re-define your question on 'format' Is it a filesystem format? floppy format? hard disk format?

I mean format type, like linux has linux ext2 and 3, and windows has fat, and ntfs, what is the unix type?

Unix is not a monolithic system controlled by a single entity. So this is harder question than you may think.

The original filesystem for unix is one that was designed by Ken Thompson back in the 1960's. One one his reason to write unix was to try out his filesystem. It didn't really have a name that I know of. While it was very cool for its time, it was pretty much abandoned by 1980. It had some serious problems. I doubt that anyone would want to use when alternatives became available.

The next major filesystem was designed by Kirk Mckusick. It is very good and it is still with us today. HP-UX calls it "hfs" for high-performance filesystem. SunOS calls it ufs. I don't know what the u stands for. But even though both OS's use this filesystem, you can't umount a disk from HP-UX and carry it to a SunOS box and mount it. There are enough differences that this won't work.

Both SunOS and HP-UX have other filesystem types built-in. Both are moving to the new Veritas filesystem and both call it vxfs. But again, you can't cross-mount a physical disk. Both OS's also have support for cd-rom type filesystems. And they both support NFS which let's you open a file on a remote system.

At this point, Unix has special features in the OS that allow easy installation of new filesystems. It is almost as easy as installing a device driver. Writing a decent filesyetm is harder than writing a decent driver, so there aren't lots of choices. But are several odd filesystems that float in from time to time. HP-UX invented its own which it called SDF, for "Structured Directory Format"...it didn't last. I have also heard of AFS (Andrew Filesystem), JFS (Journeled Filesystem), and few others that I recall just this minute.

So it's not easy to give you a definative answer.

Could it work on linux ext2?

If you're using Linux you can look under the option "File systems" at the kernel configuration menu. There you'll find file systems that can be used as native (for example ext2, Xia, reiserFS...), meaning they can be used as the primary file system.

You'll also find loads of other file systems that you can read from (and sometimes write to), for example Windows NTFS, MFS...

A program called mkfs can be used to 'format' with different file systems. mkfs takes different arguments on different flavours of unix. Checkout the local man page for exact description.

On linux, I used fdisk to make partition for a typical file system. fdisk on linux has a huge list of supported filesystem partitions it can make on hard drive.

Cheers,
Amol.