Basic Commands of Linux - Cloud Network

Networking | Support | Tricks | Troubleshoot | Tips

Buymecoffe

Buy Me A Coffee

Monday, May 1, 2017

Basic Commands of Linux

Redhat Linux Administration (Full Course, Training & Tutorial)

Step1:- How to Check the Present Working Directory (pwd)
          # pwd

Step2:- How to show the contents of a directory (folder)
          # ls

Step3:- How to See Full Permission of a directory (folder)
          # ls  -l

Step4:- How to See all contents including hidden files of a directory (folder)
          # ls -a


Step5:- How to See Tree Structure of nested directories
          # ls  -R /opt

Step6:-  How to See a file starting from i letter
           # ls  i*

Step7:- How to See a file whose length is 8 characters
          # ls  ????????

Step8:- How to create a file
          # cat > itcloudnet1

Step9:- How to see file content
          # cat  itcloudnet1

Step10:- How to append a file
           # cat  >> itcloudnet1
           # cat  itcloudnet1 itcloudnet2  >>  itcloudnet3
           # cat  itcloudnet3

Step11:- How to create a file using touch command
            # touch cloudnetwork cloudnetwork1 cloudnetwork2
            # ls

Step12:- How to creating a single directory
             # mkdir  ubuntu
             # ls

Step13:- How to creating multiple directory
             # mkdir ubuntu ubuntu1 ubuntu2
             # ls

Step14:- How to create nested directories
             # mkdir -p user1/user2/user3
             # cd user1/
             # ls
             # cd user2/
             # ls
Step15:- How to see the tree structure
             # ls -R user1/

Step16:- How to change a directory
             # cd ubuntu
             # cd ..
             # cd ../..
             #cd -
             # pwd
             # cd
             # pwd

Step17:- How to remove files
             # rm itcloudnet
             # ls

Step18:- How to remove an empty directory
             # rmdir ubuntu
             # ls

Step19:- How to remove a directory
             # rm -rf ubuntu
             # ls

Step20:- How to copy files
             # cp ubuntu ubuntu1
             # cat ubuntu1

Step21:- How to copy folders
             # sudo cp -r ubuntu2  /home/username/
             # ls /home/username

Step22:- How to rename directories and files
             # mv ubuntu3 u4
             # ls
Step23:- How to move directories and files
            # sudo mv ubuntu2  /opt
            # ls
            # cd /opt
Step24:- How to search a word from single or multiple file's
            # grep itcloudnet /etc/passwd  /etc/group  /etc/shadow
            # cat /etc/passwd | grep itcloudnet

Step25 :- How to see the type of file
             # file *

Step26 :- How to view the date
             # date
             # date -s"tus may 02 05:25:18 ist 2017"

Step27 :- How to view the calendar for completed year
             # cal 05 2017

Step28 :- How to  take help of command
              # man  mkdir

Step29 :- How to see the content screen wise
             # ls -l  /bin  |  less