HOME                                          http://bool.cjb.net

                                     WELCOME TO HASIB'S WEB WORLD

                                                      TOP LINUX COMMANDS

adduser

The adduser command used by root (or someone else who has the authority) creates a new user. The adduser command is followed by the account name to be created:

# adduser dpitts

cp

The cp command is an abbreviation for copy; therefore, this command enables you to copy objects. For example, to copy the file file1 to file2, issue the following command:

cp file1 file2

As the example shows, the syntax is very simple:

cp <original object name> <new object name>

df

Use the df command to show the amount of free disk space on any currently mounted filesystem. This information is useful in determining whether you have available storage for programs or data.

dir

dir lists the contents of directories. This command has many of the same command-line options as the ls command.

display

This program requires X11 and is part of the ImageMagick package. This is a menu- driven application you can use to create, edit, change, print, and save graphics during your X11 session. ImageMagick is typically started in the background from the command line of a terminal window like this:

# display &

fax

Use fax to create, transmit, receive, display, or print a fax. This complex shell script is the driver program for the efax software package and provides an easy-to-use way to send or receive fax documents under Linux.

fdformat

This command only performs a low-level format of a floppy disk. You must then use the mkfs command to place a specified filesystem on the disk.

fetchmail

This program gets your mail from your Internet service provider and can handle a number of electronic mail protocols besides the Post Office Protocol, or POP. You use this program by itself or in a shell script to get your mail after you've established a Point-to-Point, or PPP, connection.

free

The free commands shows how memory is being used on your system.

ftp

This is the File Transfer Protocol program. You can use the ftp command to send and receive files interactively from your computer's hard drive or other remote computer systems. The ftp command features built-in help. To see the latest offerings from Macmillan Publishing, try this:

# ftp ftp.mcp.com

gunzip

Use this program to decompress files compressed with the gzip command back to their original form.

halt

The halt command tells the kernel to shut down. This is a superuser-only command. (You must be root.)

hostname

hostname is used to either display the current host or domain name of the system or to set the hostname of the system. Here is an example:

svr01:/home/dpitts$ hostname

svr01

irc

The Internet Relay Chat program. You can use irc to communicate interactively with other persons on the Internet. The irc program has built-in help and features a split- window display so you can read ongoing discussions and type your own messages to other people.

login

login is used when signing on to a system. It can also be used to switch from one user to another at any time.

logout

logout is used to sign off a system as the current user. If it is the only user you are logged in as, you are logged off the system.

ls

The ls command lists the contents of a directory.

mdir

The mdir command lists files on a DOS disk and is part of the mtools disk drive support package.

mformat

The mformat command performs a low-level format of a floppy disk with a DOS filesystem. This command is part of the mtools software package.

mkdir

The mkdir command is used to make a new directory.

mke2fs

The mke2fs command is used to make a second extended Linux filesystem on a specified hard drive or other device, such as a floppy disk. This command does not format the new filesystem, but makes it available for use. mke2fs can also be used to label a partition and to specify a mount point or directory where the partition can be accessed after it's mounted.

mkfs

mkfs is used to build a Linux filesystem on a device, usually a hard disk partition. The syntax for the command is mkfs <filesystem>, where <filesystem> is either the device name (such as /dev/hda1) or the mount point (for example, /, /usr, /home) for the filesystem.

mkswap

mkswap sets up a Linux swap area on a device (usually a disk partition).

The device is usually of the following form:

/dev/hda[1-8]

/dev/hdb[1-8]

/dev/sda[1-8]

/dev/sdb[1-8]

mount

mount attaches the filesystem specified by specialfile (which is often a device name) to the directory specified as the parameter. Only the superuser can mount files. If the mount command is run without parameters, it lists all currently mounted filesystems. The following is an example of the mount command:

svr01:/home/dpitts$ mount

/dev/hda1 on / type ext2 (rw)

/dev/hda2 on /var/spool/mail type ext2 (rw,usrquota)

/dev/hda3 on /logs type ext2 (rw,usrquota)

/dev/hdc1 on /home type ext2 (rw,usrquota)

none on /proc type proc (rw)

newgrp

newgrp is used to enter a new group. You can use this command to temporarily become a member of a different group so you can access or work on different files or directories.

passwd

For the normal user (non-superuser), no arguments are used with the passwd command. The command asks the user for the old password. Following this, the command asks for the new password twice, to make sure it was typed correctly. The new password must be at least six characters long and must contain at least one character that is either uppercase or a nonletter. Also, the new password cannot be the same password as the one being replaced, nor can it match the user's ID (account name).

If the command is run by the superuser, it can be followed by either one or two arguments. If the command is followed by a single user's ID, the superuser can change that user's password. The superuser is not bound by any of the restrictions imposed on the user. If there is an argument after the single user's ID, that argument becomes that user's new password.

rm

rm is used to delete specified files. With the -r option--be aware, this can be dangerous!--rm recursively removes files. Therefore if you type the command rm -r / as root, you had better have a good backup--all of your files are now gone. This is a good command to use in conjunction with the find command to find files owned by a certain user or in a certain group and delete them. By default, the rm command does not remove directories.

rmdir

rmdir removes a given empty directory; the word empty is the key word. The syntax is simply rmdir <directory name>.

shutdown

Once during Star Trek: The Next Generation, Data commanded the computer to "Shut down the holodeck!" Unfortunately, most systems don't have voice controls, but systems can still be shut down. This command happens to be the one to do just that. Technically, the following shutdown call causes all or part of a full-duplex connection on a socket associated with s to be shut down:

int shutdown(int s, int how));

The shutdown command can also be used to issue a "Vulcan Nerve Pinch" (Ctrl+Alt+Del) and restart the system.

unzip

The unzip command lists, tests, or extracts files from a zipped archive. The default is to extract files from the archive. The basic syntax is unzip <filename>.

zip

The zip command lists, tests, or adds files to a zipped archive. The default is to add files to an archive.
Hosted by www.Geocities.ws

1