Important Linux Commands

Some of the important Linux commands are here to get pace up with Linux.

useradd

Basic Syntax Of Command.

useradd [options] username

  1. To add new user on Linux.
  2. Create a user with different home directory.
  3. Create a user with different user id.
  4. Create a user with different specific group id.
  5. Add a user to multiple groups.
  6. Add user login shell.

batch

Basic Syntax Of Command.

After typing the batch command, the at> prompt is displayed.

at

Basic Syntax Of Command.

at 9:30 PM Tue

  1. at executes commands at a specified time.
  2. atrm deletes jobs, identified by their job number.
  3. atq lists the user’s pending jobs, unless the user is the superuser in that case, everybody’s jobs are listed. The format of the output lines job numberdatehouryearqueue, and username.

 

banner

Basic Syntax Of Command.

 $ banner 'Hello!'
 Output Line is as:-

 #     #                                   ###
 #     #  ######  #       #        ####    ###
 #     #  #       #       #       #    #   ###
 #######  #####   #       #       #    #    #
 #     #  #       #       #       #    #
 #     #  #       #       #       #    #   ###
 #     #  ######  ######  ######   ####    ###

cat

cat stands for “catenate.”

Basic syntax of cat is :-

cat mytext.txt

It reads data from files, and outputs their contents. It is the simplest way to display the contents of a file at the command line.

  1. To Copy A Text File.
  2. Append A Text File’s Contents To Another Text File.
  3. Incorporating Standard Input Into cat Output.

cd

For change directory.

Basic Syntax:

$ cd /usr/local
:/usr/local$

  1. To change current directory to local.
  2. Move one directory to back.
  3. Move to users home directory.
  4. The cd command can be used to change into a sub directory, move back into the parent directory, move all the way back to the root directory or move to any given directory.

chmod

chmod ( Change Mode ) is used to change the permissions of files or directories.

Basic Syntax:

chmod options permission file name


chown

To change the owner of group file.

Basic Syntax:

chown [OPTION]... [OWNER][:[GROUP]] FILE...

clear

To clear the terminal screen.

Basic Syntax:

clear


cp

To copy a file and directory.

Basic Syntax:

cp [OPTION]... [-T] SOURCE DEST
cp [OPTION]... SOURCE... DIRECTORY
cp [OPTION]... -t DIRECTORY SOURCE...

cpio

copies files to and from archives.

cpio copies files from one directory tree to another.

Basic Syntax:

cpio {-o|--create} [-0acvABLV] [-C bytes] [-H format] [-M message] 
     [-O [[user@]host:]archive] [-F [[user@]host:]archive] 
     [--file=[[user@]host:]archive] [--format=format] 
     [--message=message][--null] [--reset-access-time] [--verbose] [--dot] 
     [--append] [--block-size=blocks] [--dereference] [--io-size=bytes] 
     [--rsh-command=command] [--help] [--version] < name-list [> archive]

cut

Cut command in unix is used to select sections of text from each line of files.

Basic Syntax:

$ cut -c n [filename(s)]


dc

Desk Calculator.

The desk calculator works with post-fix notation, rather like many HP Calculators. Basic arithmetic uses the standard + – / * symbols but entered after the digits.

Basic Syntax:

dc


dd

Data Duplicator.

To copy and converting data.

dd if=<source file name> of=<target file name> [Options]

 

For More Commands Watch Videos. 

Part 1

Part 2


 

Advertisements