Enotes 8 April 2023
Enotes 8 April 2023
Enotes 8 April 2023
sudo su -
sudo su -
ls
ls -l
ls -la
ls -ltr
ls -al
whoami
id
pwd
cd
.
..
ls
ls -l
ls -la
ls -ltr
mkdir
echo "hihi" > hello.txt
touch bye.txt
init 0
----------------------------------------
cat hello.txt
tail -f
head
tail
netstat -plant
http://PUBLIC-IP
Customize webpage
cd /var/www/html/
http://PUBLIC-IP
cd /var/log/httpd/
ls -ltr
tail -f access_log
--------------------------------------
Soft Link vs Hard Link :
ln
Soft Link -> Short-Cut (-s)
Hard Link -> Store at differnt Memory address
ls -iltr
ln -s mydata.txt /opt/
If we delete origional file of symlink, then link file will treated Dangling
link.
Hard link :
more
Linux FHS
df -hT
/ -> Main file system
/dev -> HDD + USB + CDROM mount here
/bin/ -> Binary command (ls , pwd, mkdir)
/sbin/ -> system binary (OS)
/home/ -> Local user create (By default)
/home/tgIndia/
/home/Mahindra/
mount point --> logical location where partition availble for access.
/ \
Temp FS Parmanent FS
/lib/
/lib64/
Kernel -> Itermediate unit (OS Software) Intraction between h/w and s/w.
du -hs *
pwd
free -gh
id
uid - user id
gid - group id
/etc/passwd
User / Process
-------------------------------------------------------
ps aux | less
top
ps -> process
a -> all
u -> user
x -> executable
passwd
ls -l /home/
When we create user in Linux OS , where its password and structure create ?
groupadd tgIndia
--------------------------------------------------
Permission in Linux OS
r read 4
w write 2
x execute 1
-------
rwx 7
7 5 0
rwx r-x ---
7 7 7
rwx rwx rwx
u user
g group
o other
a all
+ allow
- deny
= assign
--------------------------------------------------
Special permission
Stricky bit
SGID
SUID
---------------------------------------------------
Group
/ \
P. Group Supplimentry / Secondary Group
-g -G
(1) (n)
---------------------------------------------------
chattr
usermod
uname
timedatectl
hostnamectl
---------------------------------------------------
cp
rm
mv
--------------------------------------------------
ssh-keygen
scp
tar
cronjob
ps
kill
top
htop
nice
renice
nmap
host
dig
nslookup
screen
last
lastlog
w
whoami
which
whereis
pgrep
----------------------------------------
cut
awk
sed
------------------------------------