0% found this document useful (0 votes)
154 views

Red Hat Linux Basic Command Syntax

The document provides an overview of basic Linux command syntax and examples of common commands. It discusses: 1. The basic structure of Linux commands which have a command, optional option, and argument. 2. Examples of commands like ls, userdel, whoami, date, cal, uname, and top to manage files, users, system information. 3. The use of options like -l, -la with the ls command to change the output format.

Uploaded by

Alo Chaya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views

Red Hat Linux Basic Command Syntax

The document provides an overview of basic Linux command syntax and examples of common commands. It discusses: 1. The basic structure of Linux commands which have a command, optional option, and argument. 2. Examples of commands like ls, userdel, whoami, date, cal, uname, and top to manage files, users, system information. 3. The use of options like -l, -la with the ls command to change the output format.

Uploaded by

Alo Chaya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Red hat linux command syntax

Next lesson amra deka chilam sudo terminal and physical terminal niya. Eichara dekachilam putty ba
ssh diya ki kore remote login kora jai. Aj kichu basic command syntax sompor ka alaf korbo. 1st ekta
terminal open kori.
Screen

1. Amder terminal ta zoom korte chila ctrl + shift +++ dila increase hobe.
2. Amder terminal ta zoom out korte chila ctrl + --- dile decrease hobe.
3. Ctrl + l dila amder terminal ta clear hoi jabe. Terminal clear likle oh chole jabe.
4. Ctrl + shift + t dila new terminal tab gui mode open hobe. Ek ek terminal ek ek user login hoi
kaj korte pari.
5. Altr + f2 diya terminal open korer jonno box a gnome-terminal likla terminal open hoi jabe run
er motho.

Linux command er 3ta part take


1. Command
2. (option)
3. Argument
Command ta holo system er vivino script

[tuhin@tanmoy Desktop]$ userdel -r Tanmoy

Userdel holo ekta command ei command er sathe vivino option use korte pari.
-r holo option (option gula – diya likte hoi)
Tanmoy ta argument

Tobe command sobsomai option argument use hobe ta na. jemon single command gula holo cd pwd
ls date etc.

[tuhin@tanmoy /]$ ls –l (l mane holo list directory gula properties akare dekaba)
total 66
lrwxrwxrwx. 1 root root 7 Sep 12 02:47 bin -> usr/bin
dr-xr-xr-x. 4 root root 1024 Sep 12 11:05 boot

[tuhin@tanmoy /]$ ls –la (la mane hidden file soho dekbe .diya je gula suru hoi eigula hidden file)
total 74
drwxr-xr-x. 18 root root 4096 Sep 13 2018 .
drwxr-xr-x. 18 root root 4096 Sep 13 2018 ..
lrwxrwxrwx. 1 root root 7 Sep 12 02:47 bin -> usr/bin
[tuhin@tanmoy /]$ ls –li (li mane holo inode number amra human readability diya usr/bin bujtachi
but linux indexing number maddome buje 17 inode number diya. Bin amra rename korte pari but
inode ba index number ta change hoi na )
total 66
17 lrwxrwxrwx. 1 root root 7 Sep 12 02:47 bin -> usr/bin
2 dr-xr-xr-x. 4 root root 1024 Sep 12 11:05 boot
3 drwxr-xr-x. 19 root root 3220 Sep 12 22:24 dev
1308161 drwxr-xr-x. 136 root root 12288 Sep 12 22:24 etc

[tuhin@tanmoy /]$ ls –lZ ( lZ ta holo security enhance policy teka. Amr system er directory level
permission diya ache seier status. Eigular jonno alada lesson ache )
lrwxrwxrwx. root root system_u:object_r:bin_t:s0 bin -> usr/bin
dr-xr-xr-x. root root system_u:object_r:boot_t:s0 boot
drwxr-xr-x. root root system_u:object_r:device_t:s0 dev

[tuhin@tanmoy /]$ ls –lh (lh mane holo human readable file / directory gula size onojai dkte pabo)
total 66K
lrwxrwxrwx. 1 root root 7 Sep 12 02:47 bin -> usr/bin
dr-xr-xr-x. 4 root root 1.0K Sep 12 11:05 boot
drwxr-xr-x. 19 root root 3.2K Sep 12 22:24 dev
drwxr-xr-x. 136 root root 12K Sep 12 22:24 etc

ekon dekbo linux system ki doroner file directory hoi.

[tuhin@tanmoy boot]$ ls
config-3.10.0-123.el7.x86_64
grub2
initramfs-0-rescue-7a642d64dd6c40f08cc4d00b0cea420f.img
initramfs-3.10.0-123.el7.x86_64.img
initramfs-3.10.0-123.el7.x86_64kdump.img
initrd-plymouth.img
lost+found
symvers-3.10.0-123.el7.x86_64.gz
System.map-3.10.0-123.el7.x86_64
vmlinuz-0-rescue-7a642d64dd6c40f08cc4d00b0cea420f
vmlinuz-3.10.0-123.el7.x86_64

jegula hoche black eigula hoche file. Je gula hoche blue eigula hoche directory. Red holo compress
file. Green gula holo execute file.
[tuhin@tanmoy dev]$ ls
agpgart loop-control sda2 tty22 tty47 uinput
autofs lp0 sda3 tty23 tty48 urandom

yellow gula hoche device file.

[tuhin@tanmoy /]$ ll
total 66
lrwxrwxrwx. 1 root root 7 Sep 12 02:47 bin -> usr/bin

cyan gula hoche link file

[tuhin@tanmoy Desktop]$ ls
img.jpg
magenta color gula picture file

Written by
Tanmoy Raj Tuhin

Regular user [tuhin@tanmoy ~]$ tilde ta hoche home directory regular user and root user home
directory kintu alada.
[tuhin@tanmoy ~]$ cd /
[tuhin@tanmoy /]$ / holo root partition

[tuhin@tanmoy /]$ whoami


Tuhin (ami tuhin user login hoi achi )

[tuhin@tanmoy /]$ who


tuhin :0 2018-09-12 22:24 (:0)
tuhin pts/0 2018-09-12 23:26 (:0)
ei command kon kon user kon jaiga teka login hoi ache dekai.example
[root@tanmoy tuhin]# ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is 4f:66:66:21:81:b6:1c:13:25:0b:96:1c:98:45:7f:7f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
root@localhost's password:
Last login: Thu Sep 13 00:00:34 2018
[root@tanmoy ~]# who
tuhin :0 2018-09-12 22:24 (:0)
tuhin pts/0 2018-09-12 23:26 (:0)
tuhin pts/1 2018-09-12 23:59 (localhost)
root pts/2 2018-09-13 00:00 (localhost)

[root@tanmoy ~]# hostname


Tanmoy (mane holo ei computer name ki )

[root@tanmoy ~]# tty


/dev/pts/2 (mane holo ami ekon pseudo 2 console gui te login hoi achi)

[root@tanmoy ~]# date


Thu Sep 13 00:05:00 BDT 2018

[root@tanmoy ~]# cal


September 2018
Su Mo Tu We Th Fr Sa
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30

[root@tanmoy ~]# cal 2019

[root@tanmoy ~]# lastb (mane holo unsuccessful login user)


root :0 :0 Wed Sep 12 18:37 - 18:37 (00:00)
(unknown tty2 Wed Sep 12 13:50 - 13:50 (00:00)
tuhin ssh:notty 192.168.100.3 Wed Sep 12 13:48 - 13:48 (00:00)
tuhin ssh:notty 192.168.100.3 Wed Sep 12 13:48 - 13:48 (00:00)
tuhin ssh:notty 192.168.100.3 Wed Sep 12 13:48 - 13:48 (00:00)
tuhin ssh:notty 192.168.100.3 Wed Sep 12 13:48 - 13:48 (00:00)
tuhin ssh:notty 192.168.100.3 Wed Sep 12 13:02 - 13:02 (00:00)
tuhin ssh:notty 192.168.100.3 Wed Sep 12 13:02 - 13:02 (00:00)

[root@tanmoy ~]# runlevel (mane holo ei machine ta kon runlevel ache. Eikane runlevel bolte GUI
na CLI mode buja jai r ki. 5 mane holo gui mode. 3 mane holo cli mode. N mane holo none. Amr
machine ta age kono runlevel chilo na sudu gui mode chilo )
N5

[root@tanmoy ~]# uname –r (mane holo kernel version)


3.10.0-123.el7.x86_64

[root@tanmoy ~]# uname (mane holo os name ki)


Linux

[root@tanmoy ~]# cat /etc/redhat-release (mane holo amr os ta kokon er)


Red Hat Enterprise Linux Server release 7.0 (Maipo)

[root@tanmoy ~]# top (mane holo real time process monitoring kora jai. Similar as windows task
manager)

[root@tanmoy ~]# lastlog (mane holo kon user kokon login hoichilo )
Username Port From Latest
root pts/2 localhost Thu Sep 13 00:00:55 +0600 2018

[root@tanmoy ~]# free –m (mane holo RAM status dekte pari )


total used free shared buffers cached
Mem: 979 910 69 3 2 84
-/+ buffers/cache: 823 156
Swap: 2079 86 1993

[root@tanmoy ~]# df –HT (mane hlo ki ki partition ache)


Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext4 36G 5.1G 30G 15% /
devtmpfs devtmpfs 506M 0 506M 0% /dev
tmpfs tmpfs 514M 492k 514M 1% /dev/shm
tmpfs tmpfs 514M 7.4M 507M 2% /run
tmpfs tmpfs 514M 0 514M 0% /sys/fs/cgroup
/dev/sda1 ext4 500M 96M 374M 21% /boot
/dev/sr0 iso9660 3.8G 3.8G 0 100% /run/media/tuhin/RHEL-7.0 Server.x86_64

[root@tanmoy ~]# uptime (amr machine ta kotokon dore run korche koto user login hoi ache)
00:26:13 up 2:02, 4 users, load average: 0.03, 0.09, 0.13

root@tanmoy ~]# fdisk –l ( amr harddisk space and partition dekabe)


[root@tanmoy ~]# arp (device mac ip dekte pari)
Address HWtype HWaddress Flags Mask Iface
192.168.100.3 ether 00:50:56:c0:00:01 C eno16777736

[root@tanmoy ~]# logout (mane holo amr session ta close )


There are stopped jobs.

[root@tanmoy ~]# history (system history dekta pari)

[root@tanmoy ~]# !59 (nor mane holo history teka sorasori 59 line command korbe)
arp
Address HWtype HWaddress Flags Mask Iface
192.168.100.3 ether 00:50:56:c0:00:01 C eno16777736

[root@tanmoy ~]# !! (duel nor dila previous command ta aber dekab)


arp
Address HWtype HWaddress Flags Mask Iface
192.168.100.3 ether 00:50:56:c0:00:01 C eno16777736

[root@tanmoy ~]# history –c (mane holo history clear kora)

Written By
Tanmoy Raj Tuhin

You might also like