Basic Linux commands to know system

Directory Commands

Absolute Path and Relative Path

[root@localhost lib]# cd usr/bin

sh: cd: usr/bin: No such file or directory

[root@localhost lib]# cd /usr/bin/

[root@localhost bin]# 


Practice

Answers by Tawheed

[root@localhost /]# history

    1  pwd

    2  cd /etc

    3  cd ..

    4  ls -l

    5  ls -lh /boot

    6  mkdir tesdir

    7  mkdir -p dir1/dir2/dir3/dir4

    8  rm testdir

    9  rm -rf testdir

   10  rm -rf dir1

   11  history 

Linux is case sensitive so file.txt is different from File.txt


File commands

Practice

/etc/hosts contains hostnames with their ip address 

/etc/resolv.conf should contain the ip address of a DNS name server 

/etc/passwd contains user password

environment variables in Linux