Monday, August 5, 2013

10 Basic Linux and UNIX Commands for Beginners with examples

This article provide basic Linux and UNIX commands for Beginners with examples

1. cd Command

   
     To change directory to home.
$  cd /home
     To change directory to root.
$  cd /
     To get one level up from you'r current directory .
$  cd ..

2. mkdir Command

    To create a new directory called test.
$  mkdir test
     To create a new directory called test1 , test2 , test3 at once.
$  mkdir test1 test2 test3
     To create a directory tree.
$  mkdir a/b/c
3vim Command

    To create a new file called text1.txt.
$  vim text1
     To open a existing file called text2.txt.
$  vim text2.txt
4pwd Command

    To print the current working directory.
$  pwd
5. ls Command

    To view the content of a directory files and folders.

    $  ls

    To get a detailed viewed directory files and folders.

    $  ls -la

 6. clear Command

    To clear the screen.
$  clear

7. cp Command

    To copy a file .
    
    $  cp /home/aaa.txt /home/bbb.txt

8init Command

    To shutdown the computer.

    $  init 0

    To restart the computer.

    $  init 6

9. rm Command

    To Delete a file .
    
    $  rm /home/aaa.txt

  To Delete a Directory contain files .
    
    $  rm -rf /home/test

10passwd Command

 To change a password of the current user .

    $  passwd

    To change a password of a user.

    $  passwd root




No comments:

Post a Comment