Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linux 101 Training Module Linux Basics.

Similar presentations


Presentation on theme: "Linux 101 Training Module Linux Basics."— Presentation transcript:

1 Linux 101 Training Module Linux Basics

2 This presentation will cover the following topics in Linux OS
User and groups Logging into File System Commands File viewing commands

3 Users Groups , Root Access to Linux is based on users and groups
Each user has a password and belongs to one or more groups. Group information is stored in the /etc/group file.  The groups command displays the user's groups.

4 Logging Into Login from Putty Enter the IP address and port
At the login prompt enter the following Login as : <ctrainee> password:<pwd> After successful logging : ~]$

5 File System / bin usr lib home etc tmp sbin dev | netstorm ctrainee work scripts bin

6 File System /bin Essential user command binaries (for use by all users) /etc Host-specific system configuration /home User home directories. This is where you save your personal files /lib Essential shared libraries and kernel modules /usr /usr is the second major section of the filesystem. /usr is shareable, read-only data. /var /var contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files. /proc System information stored in memory mirrored as files.

7 Commands ls List Files cp Copy Files mv Rename rm Delete
cd Change directory pwd Print current directory mkdir Create directory rmdir Delete directory

8 Ls command ls – List of directory contents ls ls –l
adf etc pdf scenarios testcases webapps ls –l rw-rw-r-- 1 netstorm netstorm Aug :59 README drwxr-xr-x 6 netstorm netstorm Aug :59 samples

9 Permissions Link Users Group Size Date Directory or file
-rw-rw-r netstorm netstorm Oct :216 abc.txt file permissions – 12 bits (4 octal values) Uppermost 3 bits – suid(4), sgid(2), sticky (1) Next 3 bits – user read(4), write (2), execute (1) Next 3 bits – group Next 3 bits -- others

10 Read permission.  Regular file : file can be opened and read. Directory : list the contents of the directory. Write permission.  Regular file : file can be modified ,write new data. Directory : can add, remove, and rename files in the directory. Execute permission.  Regular file : execute file as a program or a shell script. Directory : to access files in the directory and enter it, with the cd command

11 cp - copy files and directories
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY. cp source.txt dest Copies source.txt to dest dir

12 mv Moving and renaming moving or renaming files. $ mv file file2
If file2 doesn't exist, it'll be created, but if it exists, it'll be overwritten

13 rm removes files or dir Removes file
rm file Forcefully removes file from the system rm –f abc.txt

14 cd change directory changing directory to ab
cd ab prints the current directory pwd /home/ctrainee

15 mkdir & rmdir mkdir – make directory abc mkdir abc
Rmdir – remove directory abc rmdir abc

16 File viewing commands Cat Tail More Grep

17 cat command cat - concatenate files and print on the standard output
$ cat xtest #!/bin/bash Y=`cat /etc/build_num` echo $Y Y=`expr $Y + 1`

18 Tail Command tail - output the last part of files
tail webapps/logs/TR1001/summary.report Test Case Name: tests Test Run Number: 1001 Test Started At: 9/27/12 09:26:11 Test Configuration

19 more command More is a filter for paging through text one screenful at a time For example, more out.log

20 grep command Searches the given file for lines matching the given strings or words. Search /etc/passwd for boo user: $ grep boo /etc/passwd


Download ppt "Linux 101 Training Module Linux Basics."

Similar presentations


Ads by Google