Commands

Root (Password: animash1234)   Admin
Animash (Password: animash12)   User
Opu (Password: animash1)   User

Addind a user and give password

#adduser Dulal
#passwd Dulal

To change root password

#passwd root
          Or
#passwd

Password Disable/Remove

#passwd –d Dulal

To know About The Logged In User

#w                        Details with login time
#who                   Summary information
#whoami             Name of the user
#who am I           Details about the console
#tty                      Details about the console

To give comments to a new user

#adduser –c “This is a another user” jit

To modify the user’s comments for an existing user

#usermod –c “This is Linux comment” jit

To delete user

#userdel jit          [with out home directory]
#userdel –r jit               [Including home directory]

To know about the status of the password

#passwd –S opu

To know about the existing position

#pwd

To see the directory contents

#ls -la

To clean the screen

#clear         or      #ctrl+l

To know about the kernel version

#uname -r

To know RPM version

#rpm package handle

Details about password file

#cd /etc
#cat passwd
Example: user name: encrypted password: user ID: group ID: comments: home directory of the user: shell
animash:x:1000:1000:This is first user:/home/animash:bin/bash

To create a file

#vi student.txt
Esc=command mode
i=editor mode
e=go to first to last in word[in command]
dw=delete word[in command]
          dd=delete this line[in command]
          u=undo[in command]
          cw=give permition to change the word[in command]
          cc=change line[in command]
          yy=copy this line[in command]
          p=pest which you copy [in command]
          Esc:w=save file[not close file]
          Esc:q!=file close[will not be save]
          Esc:wq=save and close this file

To List information about the files

#ls                        [Listing directory’s]
#cd /etc                [Go to etc directory]
#pwd                    [present working directory]
#dir                      [Show the directories]
#ls –l                    [Show as a list]
#ls –a                   [Show with hidden files]
#ls –la                  [Show hidden files with list]
#ls –la | more      [Show hidden files with list by click enter] (go to command by click “q”)
#ls –la | lass        [Show hidden files with list by click down, up arrow & enter] (go to command by click “q”)

To show system date, calendar, year

#date
#cal
#cal 2017

To create a blank file

#touch student

To go user mode

#cd ~opu                                 [Enter as opu user]
#pwd                                       [Print name of current/working directory]
#cd ~                                       [Go to root]
#bc                                          [Basic calculator(exit by write “quit”)]
#cp /etc/at.deny /home/          [copy “at.deny” file etc folder to home folder]

To create a directory

#cd /etc                         [go to etc directory]
#mkdir myFolder         [create a folder(myFolder)]

Copy a directory to another directory

#cd –r /etc/abrt /home/

Delete a directory

#rm /home/abrt
#rm –f /home/abrt
#rm –r /home/abrt

View file type

#file /etc/adjtime         [See file type]
#file /mnt/iso               [See folder]



0 comments:

Post a Comment