Access Linux File System in RHEL - RHCSA (RH124).pdf

support8872 3,855 views 19 slides Sep 30, 2024
Slide 1
Slide 1 of 19
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19

About This Presentation

Slides on how to access linux file system - Part of RHCSA (RH124) syllabus


Slide Content

Access Linux File System

Linux
●Open-source
●Unix-like OS kernel
●Started by Linus Torvalds in 1991 as a
personal project
●Global developer collaboration led to
widespread adoption

Tux
●Official mascot created by Larry Ewing
●Represents coolness and stability
Source:https://greencloudvps.com/linux-distributions-e
verything-you-need-to-know.php

Features of Linux
Source: Features of Linux Operating System - Naukri Code 360

Basic linux commands
●whoami
●man
●—help
●whatis
●pwd
●mkdir
●cd
●fdisk -l
●less



●more
●head
●tail
●echo
●sed
●awk
●which
●stat
●history

Get current user name
●Command: whoami


Display manual pages for a command
●Command: man <command>

Get information on a command's usage, options, and syntax.
●Command: <command> – – help






Get a one-line description of any command
●Command: whatis <command>

Get current directory path
●Command: pwd



Create a directory and then verify it using ‘ls’ command
●Command: mkdir <directory-name>

To change the current working directory
●Command: cd <directory-name>
Change directory to parent directory
●Command: cd ..

Stay in current directory
●Command: cd .


Change directory to home directory
●Command: cd ~

List all the disk partitions
●Command: fdisk -l

View the content, one page at a time
●Command: less </path/to/file>

View content of a file one screen at a time
●Command: more <file-name>

Head:
●Used to display starting lines of a file
●By default it shows the first 10 lines
●-n option specifies how many lines to display
●Command: head -n 5 <file-name>

Tail:
●Displays last lines of file
●By default shows last 10 lines of file
●-n option specifies how many lines to display
●-f option can be used to keep tail command running and display new
lines as they are appended to the file
●Command: tail -n 5 <file-name>

echo:
●Used to print text to terminal
●Command: echo <text>



●‘>’ redirects output into a file
●Takes output from echo (left) and redirects it to myfile.txt (right)
●Command: echo 'This is a sample text' > <file-name>

Find and replace text within a file
●Command: sed -i 's/{old_text}/{new_text}/' <file-name>

awk:
●Text processing tool
●Used for pattern scanning and processing in files or streams
●-F option allows setting a custom field delimiter with whitespace as
the default
●Transform files and produce formatted output lines
●Command: awk -F: '{print $1}' <file-name>

Find the full path of the bash shell
●Command: which bash


List previously executed commands in the current session.
●Command: history

Display detailed information about the file: file name , permissions and
timestamps

●Command: stat <file-name>