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

Basic Class 2

The document details a series of commands executed in a Linux environment, including user management, directory creation, and file manipulation. A user named 'feroz' is created with password constraints, and multiple directories are structured under 'KernelTech' and 'Worldcup'. Additionally, text files are created and populated with sample content in the 'Worldcup' directory.

Uploaded by

bharathbabu2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

Basic Class 2

The document details a series of commands executed in a Linux environment, including user management, directory creation, and file manipulation. A user named 'feroz' is created with password constraints, and multiple directories are structured under 'KernelTech' and 'Worldcup'. Additionally, text files are created and populated with sample content in the 'Worldcup' directory.

Uploaded by

bharathbabu2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 4

login as: root

┌──────────────────────────────────────────────
────────────────────────┐
│ • MobaXterm Personal Edition
v22.1 • │
│ (SSH client, X server and netwo
rk tools) │


│ ⮞ SSH session to [email protected]

│ • Direct SSH : ✓

│ • SSH compression : ✓

│ • SSH-browser : ✓

│ • X11-forwarding : ✓ (remote display is
forwarded through SSH) │


│ ⮞ For more info, ctrl+click on help or visit
our website. │
└──────────────────────────────────────────────
────────────────────────┘

Last login: Thu Dec 8 20:16:13 2022


[root@server1 ~]#
[root@server1 ~]# ifconfig | grep inet
inet 192.168.52.10 netmask 255.255.255.0 broadcast
192.168.52.255
inet6 fe80::c6f7:19be:ea28:5a75 prefixlen 64 scopeid
0x20<link>
inet 192.168.1.8 netmask 255.255.255.0 broadcast
192.168.1.255
inet6 fe80::7260:6d1b:177c:b8e8 prefixlen 64 scopeid
0x20<link>
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
[root@server1 ~]# useradd feroz
[root@server1 ~]# passwd feroz
Changing password for user feroz.
New password:
BAD PASSWORD: The password fails the dictionary check - it is too
simplistic/systematic
Retype new password:
Sorry, passwords do not match.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@server1 ~]#
[root@server1 ~]# mkdir KernelTech^C
[root@server1 ~]# ls
anaconda-ks.cfg original-ks.cfg
[root@server1 ~]# mkdir KernelTech
[root@server1 ~]# ls
anaconda-ks.cfg KernelTech original-ks.cfg
[root@server1 ~]# cd KernelTech/
[root@server1 KernelTech]# pwd
/root/KernelTech
[root@server1 KernelTech]# mkdir Linux Aix Storage
[root@server1 KernelTech]# ls
Aix Linux Storage
[root@server1 KernelTech]# cd Linux/
[root@server1 Linux]# ls
[root@server1 Linux]# mkdir advlinux linuxclstr
[root@server1 Linux]# ls
advlinux linuxclstr
[root@server1 Linux]# pwd
/root/KernelTech/Linux
[root@server1 Linux]# cd ..
[root@server1 KernelTech]# ls
Aix Linux Storage
[root@server1 KernelTech]# cd Aix/
[root@server1 Aix]# mkdir hacmp lpar
[root@server1 Aix]# ls
hacmp lpar
[root@server1 Aix]# pwd
/root/KernelTech/Aix
[root@server1 Aix]# cd ..
[root@server1 KernelTech]# cd Storage/
[root@server1 Storage]# pwd
/root/KernelTech/Storage
[root@server1 Storage]# mkdir san netapp
[root@server1 Storage]# ls
netapp san
[root@server1 Storage]# cd
[root@server1 ~]# tree KernelTech/
KernelTech/
├── Aix
│ ├── hacmp
│ └── lpar
├── Linux
│ ├── advlinux
│ └── linuxclstr
└── Storage
├── netapp
└── san

9 directories, 0 files
[root@server1 ~]# ls
anaconda-ks.cfg KernelTech original-ks.cfg
[root@server1 ~]# rm -rf KernelTech/
[root@server1 ~]# ls
anaconda-ks.cfg original-ks.cfg
[root@server1 ~]# tree KernelTech/
KernelTech/ [error opening dir]

0 directories, 0 files
[root@server1 ~]# mkdir -p
KernelTech/{Linux/{advlinux,linuxclstr},Aix/{hacmp,lpar},Storage/{san,netapp}
}
[root@server1 ~]# ls
anaconda-ks.cfg KernelTech original-ks.cfg
[root@server1 ~]# tree KernelTech/
KernelTech/
├── Aix
│ ├── hacmp
│ └── lpar
├── Linux
│ ├── advlinux
│ └── linuxclstr
└── Storage
├── netapp
└── san

9 directories, 0 files
[root@server1 ~]# mkdir -p
Worldcup/{India/{sachin,shewag,kohili},Pak/{malik,rizwan,babar},Aus/
{warne,ricky,smith}}
[root@server1 ~]# tree Worldcup/
Worldcup/
├── Aus
│ ├── ricky
│ ├── smith
│ └── warne
├── India
│ ├── kohili
│ ├── sachin
│ └── shewag
└── Pak
├── babar
├── malik
└── rizwan

12 directories, 0 files
[root@server1 ~]# touch Worldcup/Aus/smith/file1
[root@server1 ~]# tree Worldcup/
Worldcup/
├── Aus
│ ├── ricky
│ ├── smith
│ │ └── file1
│ └── warne
├── India
│ ├── kohili
│ ├── sachin
│ └── shewag
└── Pak
├── babar
├── malik
└── rizwan

12 directories, 1 file
[root@server1 ~]# touch Worldcup/Pak/rizwan/file2
[root@server1 ~]# tree Worldcup/
Worldcup/
├── Aus
│ ├── ricky
│ ├── smith
│ │ └── file1
│ └── warne
├── India
│ ├── kohili
│ ├── sachin
│ └── shewag
└── Pak
├── babar
├── malik
└── rizwan
└── file2

12 directories, 2 files
[root@server1 ~]# cat > Worldcup/Aus/smith/file1
Hi this is the test file.
^C
[root@server1 ~]# cat Worldcup/Aus/smith/file1
Hi this is the test file.
[root@server1 ~]# cat > Worldcup/Pak/rizwan/file2
Hi this is the test file2.
^C
[root@server1 ~]# cat Worldcup/Pak/rizwan/file2
Hi this is the test file2.
[root@server1 ~]# cd Worldcup/
[root@server1 Worldcup]# ls
Aus India Pak
[root@server1 Worldcup]# cd Pak/
[root@server1 Pak]# ls
babar malik rizwan
[root@server1 Pak]# cd babar/
[root@server1 babar]# ls
[root@server1 babar]# touch file3
[root@server1 babar]# ls
file3
[root@server1 babar]# cat > file3
Hi this is the test file3.
^C
[root@server1 babar]# cat file3
Hi this is the test file3.
[root@server1 babar]#

You might also like