Linux basic commands, creation of files,VI Editor& User,GRoup Admin

Add to Favourites
Post to:

Description
This is purely a LAB session of Linux using desktop sharing concept.

Comments
Presentation Transcript Presentation Transcript

Slide 1 : LINUX KOLLA SANJEEVA RAO MCA

LAB-1 : LAB-1

LAB # 1( BASIC COMMANDS) : LAB # 1( BASIC COMMANDS) 1.How to show list of files & directories? # ls -l 2.List of files and directories including hidden? # ls-a 3. List of the files and directories in reverse order? # ls -r 4.If you want to show the list of files and directories along with the inode number? # ls -il 5.How to stop running screen? # ^C

LAB # 1( BASIC COMMANDS) : LAB # 1( BASIC COMMANDS) 6.How to list the attributes of particular file or directory? # ls -ld 7.How to show the List of files in the tree structure? # ls-R

LAB # 1( creation of files) : LAB # 1( creation of files) 8.To create a File using cat? # cat > filename 9.How to view the contents of a file # cat filename. 10.How to append a data to file? # cat >> filename 11.To transfer the contents of a file1 &file2 to file3? # cat >>

LAB # 1( creation of files) : LAB # 1( creation of files) 12.To create multiple files? # touch 13.How to create multiple directories? # cat filename. 10.How to append a data to file? # cat >> filename 11.To transfer the contents of a file1 &file2 to file3? # cat >>

LAB # 2( User& Group Administration) : LAB # 2( User& Group Administration) 1. Creating a user # useradd u1 2.To set Password for u1 # passswd u1 3.How to confirm the creation of user? # vi /etc/passwd 4.If you want to change user ID? # useradd –u 700 u1 ( Group-id will be changed automatically) 5.How to change group-ID? # useradd –g 501 u2

LAB# 2( User& Group Administration) : LAB# 2( User& Group Administration) 6.How to override user-id? # useradd –u 701 -0 u3 (701 is already existing user-id) 7. How to add the user as a member of the secondary group? # groupadd lgs # useradd –G lgs l1 # Vi /etc/group 8.How to change the home directory? # mkdir /mkt # useadd –d /mkt/m1 m1 9.How to change shell? # useadd –s/bin/tcsh m2

Master Useradd command : Master Useradd command

LAB 2( User& Group Administration) : LAB 2( User& Group Administration) 10.How to change login-name? # usermod –l user1 u1 (u1 is old name and user1 is new name) 11.How to Lock the Password? # usermod –L user1 12. How to UnLock the password? # usermod –U user1 13. How to delete a user? # userdel user1 14. To confirm weather the user is deleted or not? # vi /etc/passwd

LAB 2( User& Group Administration) : LAB 2( User& Group Administration) 15.How to create a group? #groupadd group1 16.How to confirm the group creation? #vi /etc/group 16.How to allot our own GID to a group? #groupadd –g 950 group2. 17.What is the use of override option ? # groupmod –g 950 -0 group3. 18. How to change the Group name? # groupmod –n 19. How to delete a group? # groupdel group2 group3 950

LAB 2( User& Group Administration) : LAB 2( User& Group Administration) 20.How to add the users as a members of the Group? Implimentation # groupadd linuxg # usreradd l1 # useradd l2 # useradd l3 # gpasswd –a l1 linuxg # vi /etc/group # gpasswd –M l2,l3 linuxg 21. Deleting a User From a group? # gpasswd – d l2 linuxg l1 l2 l3 l1 l2 l3 users Linux Group

LAB 2( User& Group Administration) : LAB 2( User& Group Administration) 22.How to make one user as a administrator of the groupers as a members of the Group? # gpasswd –A l3 linuxg l1 l2 l3 l1 l2 l3 users Linux Group Designated as Administrator

LAB 2( User& Group Administration) : LAB 2( User& Group Administration) 23.How to change the password age? # Chage l1 Minimum password Age :[ ] Maximum password age:[] Last password Change: Password Expiry : 24.What is use of the command FINGER? # Finger l2 it displays the user information. login Directory Never logedin Mail etc 25.How to change t he FINGER information? # Chfn l2

Shell : Shell Default shell in Linux is bash. Bash-Bourne again shell [root @ localhost ~] # shell User name Host or computer name Root user logged in Current working Directory /root

Shell : Shell Shell looks as follows if normal user is logged –in [u1 @ localhost ~] $ shell User name Host or computer name Normal user logged in Current working Directory /home/u1

Types of shells : Types of shells /bin/sh /bin/bash /sbin/nologin /bin/ash /bin/bsh /bin/ksh /bin/tcsh /bin/csh

Tele terminals (Virtual Console) : Tele terminals (Virtual Console) There are 07 tty present in Linux. tty1 CTRl+Alt+F1 tty2 CTRl+Alt+F2 tty3 CTRl+Alt+F3 tty4 CTRl+Alt+F4 tty5 CTRl+Alt+F5 tty6 CTRl+Alt+F6 tty7 CTRl+Alt+F7 Text Based Graphical

Want to learn?

Sign up and browse through relevant courses.

Name:
Your Email:
Password:
Country:
Contact no:


Area code Number
Subjects you are interested in:
Word verification: (Enter the text as in image)


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy
IT Expert
DBA Oracle 9i,LINUX,C,C++,O/S ,NETWORKING, SE
User
43 Members Recommend
218 Followers

Your Facebook Friends on WizIQ

Give live classes, create & sell online courses

Try it free Plans & Pricing

Connect