0% found this document useful (0 votes)
42 views4 pages

Linux Alagu 1

The document provides an overview of Linux, including its open-source nature, various distributions like Red Hat, CentOS, and Ubuntu, and essential Linux OS terminology. It outlines commands for managing hardware, directories, and user accounts, as well as basic operations like checking system resources and file manipulation. Additionally, it explains the structure of the Linux directory and offers command examples for various tasks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views4 pages

Linux Alagu 1

The document provides an overview of Linux, including its open-source nature, various distributions like Red Hat, CentOS, and Ubuntu, and essential Linux OS terminology. It outlines commands for managing hardware, directories, and user accounts, as well as basic operations like checking system resources and file manipulation. Additionally, it explains the structure of the Linux directory and offers command examples for various tasks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Linux

Open source
Security
All devops tools can run

Distribution / flavours of linux


 Red hat linux (7.x, 8.x) - enter edition / using for technical support /
all software - pay
 Centos linux (7.x, 8.x) - without any technical support utsing - not pay
 Ubuntu (22.x)
 Open suse (14.x)
 Fedora
 Debian
 etc

Linux OS terminology
Hardware
Kernal (2.x = 6.x, 3.x = 7.x, 4.x = 8.x, 5.x = 9.x)- intermidiate of shell and
hardware / the kernal exacute the command / it performs all the task /
every task such as ls, hostname, mkdir, etc…
Grub2 - grant unified boor loader 2 (it booting kernal)
Shell (#- admin (root), $- non admin/limited access (user id) - using run
the command
Commands

Physical server - directly install


One hardware
One OS

Virual server
Multiple server
Usinbg hypervisor software (types => esx -I = VM ware, xen = citrix(open
source), hyber -v = MS
Single hardware multiple OS

Command for seeing kernal version # uname -r


Directory - structure
Main drive is # /
Boot - booting files
Root - cd /root (only admin can access)
Home - cd /home/raju (every user home directory)
Etc - all system configuration
Dev - hard disk list (storage)
Var- variable directory (system logs)
Bin - command location / binary / which ls (normal user)
Sbin - super user binary / which fdisk
Tmp - temporary directory (important directory linux)

Ram checking # free -h


Hard disk # lsblk
Cpu checking # lscpu
Can view all using command # history
Os version # cat /etc/os-release
# date & time = use normally can view
Calander # cal
Mention year # cal 2023
Every login user send the notification # wall “im going to shutdown”
Showing ip address # hostname / if config / ip a
/ main directory
Change directory # cd /
List under current folder # ls
Detail of the folder # ls -l

dr-xr-xr-xr-xr - should be 10 digit (first one -(directory) / next two (user) /


next two (group) / next two (others)
lr-xr-xr-r
-x-xr-ex-r

Start with “d” its directory (sans)


Start with “l” its link file (sans -> xxx,xxx)
Start with “-” its file

Last modify time # ls -lt


Last reverage # ls -ltr
# useradd name
Set up password # echo “redhat” | passwd --stdin user name
User connect or not # w
User connection checking # pikill -9 -t pts/o
Add every user name like this then w using view connection
# walch -n 1 w
Kick out user # pkill -9 -t pts/o
Root # whoami
Root /time/date/terminal type/ip # who am i

view login user # w


Stop viewing # watch -n 1 w
Path # cd /tmp
Delete old files # rm -rf *
Home path # pwd
Give # w
Give # 11
Display file content # cat filename
Find and replace the file # :%s/find/replace/g
Line number # :set nu
Remove number # :set nonu
# cat -n filename (can check home many lines)
Last line # tail filename # tail -3 filename
First line # head filename
Line by line # less filename
Percent of file # more filename
Fine the word in file # grep word filename
All file search # grep word *
File searching upper or lower # grep -i word filename
Where the first word started line # grep -i ^word filename
First word # grep ^word sandy
Except this all # grep -v ^word sandy

Filter command
# cat -n filename | head -100
# cat -n filename | head -100 | tail -11
# ip a | grep inet
# ip a | grep inet | grep -v inet6
Directory command
# mkdir
Showing all latest time creating file # ls -ltr
Remove directory # rm -rf directory name
# ls -l direc name
# cp filename direc name
# cp * dir name/
# man cp (can clarrify all the meaning)
# mkdir /opt/directory name = ex mkdir /opt/backup (creating dir in opt
path)
# cp -R dir_name /opt/backup

You might also like