You are on page 1of 20

Module Code & Module Title

Level 5 – Network Operating Systems

Assessment Type
Logbook 6

Semester
2022 Autumn

Student Name: Aman Yadav


London Met ID: 22015647
College ID: NP01CP4S220016
Assignment Due Date: December 1, 2022
Assignment Submission Date: December 1, 2022
Submitted To: Pratik Karki
Word Count (Where Required): 1433
I confirm that I understand my coursework needs to be submitted online via Google Classroom under the
relevant module page before the deadline in order for my assignment to be accepted and marked. I am
fully aware that late submissions will be treated as non-submission and a mark of zero will be awarded.
Table of Contents

1. Basic Linux Operating System Commands .............................................................. 1

1.1 Aim ..................................................................................................................... 1

1.2 Objective ............................................................................................................ 1

1.3 Required Tools and Concepts ............................................................................ 1

1.4 Steps required for lab ......................................................................................... 3

1.5 Conclusion ....................................................................................................... 10

2. Appendix ................................................................................................................. 11

3. Reference ............................................................................................................... 17
List of Figures

Figure 1: Kali Linux Terminal ........................................................................................... 1


Figure 2: Step 1 ............................................................................................................... 3
Figure 3: Step 2 ............................................................................................................... 3
Figure 4: Step 3 ............................................................................................................... 4
Figure 5: Step 4 ............................................................................................................... 4
Figure 6: Step 5 ............................................................................................................... 5
Figure 7: “Script” Command ............................................................................................ 5
Figure 8: “Whoami” Command ........................................................................................ 5
Figure 9: “who” Command ............................................................................................... 5
Figure 10: “date” Command ............................................................................................ 6
Figure 11: “ls” Command ................................................................................................. 6
Figure 12: “cat/etc/passwd” Command ............................................................................ 7
Figure 13: ‘sudo’ Command ............................................................................................ 8
Figure 14: “finger” Command .......................................................................................... 8
Figure 15: “echo” Command............................................................................................ 8
Figure 16: “cat” Command............................................................................................... 9
Figure 17: Displaying new files ........................................................................................ 9
Figure 18: Displaying contents of files ............................................................................. 9
Figure 19: Concatenating files ....................................................................................... 10
Figure 20: “script exit” command ................................................................................... 10
TBD Network Operating Systems

1. Basic Linux Operating System Commands

1.1 Aim

The goal of the week 6 workshop is to install Kali Linux and acknowledge basic
commands of Kali Linux terminal.

1.2 Objective

The main objectives of sixth week workshop are as follows:


 Download a Kali Linux terminal
 Create a default UNIX user account
 Investigate the fundamental Kali Linux commands

1.3 Required Tools and Concepts

The workshop's primary tool is Kali Linux Terminal.

Figure 1: Kali Linux Terminal

Aman Yadav 1
TBD Network Operating Systems

In the “Kali Linux Terminal” all you have to do to run a command is type it in and
supply the necessary input. The only thing left to do is press the enter key. The
output of that command will be run through the shell by the terminal in response
(javatpoint, 2020).

“LINUX” is an operating system or kernel that is freely available under an open-


source license. Its feature set is quite similar to that of UNIX. The kernel is a
program at the basis of the Linux operating system that handles basic tasks such
as allowing hardware to interface with software (brent, 2022).

The “cat command” is a utility command in Linux. One of its most typical use is
to print the contents of a file to the standard output stream. Aside from that, the
cat command allows us to write text into a file (baeldung, 2022).

The “finger command” is a user information lookup command that returns


information about all users who have logged in. System administrators are the
most likely users of this tool. It displays information such as login name, user
name, idle time, login time, and, in certain situations, their email address
(geeksforgeeks, 2020).

Aman Yadav 2
TBD Network Operating Systems

1.4 Steps required for lab

In the lab, these tasks were completed to install Kali Linux . They are as follows:
i. Open Windows Features, enable "SMB 1.0/CIFS File Sharing Support,"
"Windows Subsystem for Linux," and "Work Folders Client," and then press
the OK button.

Figure 2: Step 1

ii. After the desired modifications have been made successfully, close the
Windows Features page.

Figure 3: Step 2

Aman Yadav 3
TBD Network Operating Systems

iii. Download the Linux Kernel Package from the following website:
https://www.techgeeknext.com/tools/download-linux-kernel-update-package

Figure 4: Step 3

iv. Install the package and then click the Finish button when it is finished.

Figure 5: Step 4

Aman Yadav 4
TBD Network Operating Systems

v. Install the Kali Linux application from the Microsoft Store.

Figure 6: Step 5
Steps required for lab are:
i. Using the "script a1script" command, create a script file called "a1script."

Figure 7: “Script” Command

ii. Using the "whoami" command, determine the account's username.

Figure 8: “Whoami” Command

iii. Using the "who" command, display information about all current local system
users.

Figure 9: “who” Command

Aman Yadav 5
TBD Network Operating Systems

iv. Using the "date" command, determine the current date and time.

Figure 10: “date” Command

v. The "ls" command displays the names of files in the system; the "ls -a"
command displays hidden files in the system; and the "ls -a -l" command
displays the file or directory's size, updated date and time, file or folder name,
owner, and permissions.

Figure 11: “ls” Command

Aman Yadav 6
TBD Network Operating Systems

vi. Display all registered users having access to system using “cat /etc/passwd”

Figure 12: “cat/etc/passwd” Command

vii. Update the system and install the finger using “sudo apt-get update” and
“sudo apt-get install finger” command

Aman Yadav 7
TBD Network Operating Systems

Figure 13: ‘sudo’ Command

viii. View user information by using the "finger [username]" command.

Figure 14: “finger” Command

ix. Create the file 'test1' with the command "echo "This is a one-line file" > test1".

Figure 15: “echo” Command

Aman Yadav 8
TBD Network Operating Systems

x. Using the "cat > test2" command, create the file "test2."

Figure 16: “cat” Command

xi. Using the "ls" tool, you can see all of the files on your system.

Figure 17: Displaying new files

xii. View the contents of the files using the commands "cat test1" and "cat test2."

Figure 18: Displaying contents of files

Aman Yadav 9
TBD Network Operating Systems

xiii. Concatenate the files 'test1' and 'test2' into a new file 'test3' with the "cat test1
test2 > test3" command.

Figure 19: Concatenating files

xiv. Exit the script with the "exit" command.

Figure 20: “script exit” command

1.5 Conclusion

In Week 6, I discovered how to install Kali Linux and became familiar with its
fundamental commands. I also gained knowledge about files and directories. After
completing this task, I was able to use basic Linux commands with easily. Overall, I
achieved all of my Week 6 goals and objectives.

Aman Yadav 10
TBD Network Operating Systems

2. Appendix

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ script a1script


Script started, output log file is 'a1script'.

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ whoami
amanyadav

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ who

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ date
Wed Dec 28 04:58:23 PM +0545 2022

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ ls
8cat-grep a1script c7 cd one W7 w8 W8 w9

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ ls -a
. 8cat-grep .bash_history .bashrc c7 .config one W7 W8 .zshrc
.. a1script .bash_logout .bashrc.original cd .java .profile w8 w9

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ ls -a -1
.

Aman Yadav 11
TBD Network Operating Systems

..
8cat-grep
a1script
.bash_history
.bash_logout
.bashrc
.bashrc.original
c7
cd
.config
.java
one
.profile
W7
w8
W8
w9
.zshrc

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ cat/etc/passwd
bash: cat/etc/passwd: No such file or directory

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ cat /etc/passwd


root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync

Aman Yadav 12
TBD Network Operating Systems

games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
systemd-network:x:101:102:systemd Network
Management,,,:/run/systemd:/usr/sbin/nologin
systemd-resolve:x:102:103:systemd Resolver,,,:/run/systemd:/usr/sbin/nologin
amanyadav:x:1000:1000:,,,:/home/amanyadav:/bin/bash

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ sudo apt-get update


[sudo] password for amanyadav:
Sorry, try again.
[sudo] password for amanyadav:
Sorry, try again.
[sudo] password for amanyadav:
Get:1 http://ftp.acc.umu.se/mirror/kali.org/kali kali-rolling InRelease [30.6 kB]
Get:2 http://ftp.acc.umu.se/mirror/kali.org/kali kali-rolling/main amd64 Packages [19.0
MB]

Aman Yadav 13
TBD Network Operating Systems

Get:3 http://ftp.acc.umu.se/mirror/kali.org/kali kali-rolling/non-free amd64 Packages [238


kB]
Get:4 http://ftp.acc.umu.se/mirror/kali.org/kali kali-rolling/contrib amd64 Packages [114
kB]
Fetched 19.4 MB in 16s (1,227 kB/s)
Reading package lists... Done

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ sudo apt-get install finger


Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
finger
0 upgraded, 1 newly installed, 0 to remove and 157 not upgraded.
Need to get 19.8 kB of archives.
After this operation, 50.2 kB of additional disk space will be used.
Get:1 http://mirror.netcologne.de/kali kali-rolling/main amd64 finger amd64 0.17-17 [19.8
kB]
Fetched 19.8 kB in 2s (11.1 kB/s)
Selecting previously unselected package finger.
(Reading database ... 17300 files and directories currently installed.)
Preparing to unpack .../finger_0.17-17_amd64.deb ...
Unpacking finger (0.17-17) ...
Setting up finger (0.17-17) ...

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ finger amanyadav


Login: amanyadav Name:
Directory: /home/amanyadav Shell: /bin/bash

Aman Yadav 14
TBD Network Operating Systems

Never logged in.


No mail.
No Plan.

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ echo "This ia a one-line file" > test1

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ cat > test2


This is file two.
It has several lines.
Three lines, in fact.

^Z
[1]+ Stopped cat > test2

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ ls
8cat-grep a1script c7 cd one test1 test2 W7 w8 W8 w9

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ cat test1


This ia a one-line file

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ cat test2


This is file two.
It has several lines.

Aman Yadav 15
TBD Network Operating Systems

Three lines, in fact.

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ cat test1 test2 > test3

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ cat test3


This ia a one-line file
This is file two.
It has several lines.
Three lines, in fact.

┌──(amanyadav㉿LAPTOP-BUPQ0IF4)-[~]

└─$ exit
exit
There are stopped jobs.

Aman Yadav 16
TBD Network Operating Systems

3. Reference

baeldung, 2022. Writing Text to File Using Linux Cat Command | Baeldung on Linux.
[Online]
Available at: https://www.baeldung.com/linux/cat-writing-
file#:~:text=The%20cat%20command%20is%20a,some%20texts%20into%20a%20file.
[Accessed 25 december 2022].
brent, m., 2022. What is Linux Operating System? Introduction to Linux OS. [Online]
Available at: https://www.guru99.com/introduction-linux.html
[Accessed 25 12 2022].
geeksforgeeks, 2020. Finger command in Linux with Examples - GeeksforGeeks.
[Online]
Available at: https://www.geeksforgeeks.org/finger-command-in-linux-with-examples/
[Accessed 25 december 2022].
JasonGerend, J., 2022. Server Manager | Microsoft Learn. [Online]
Available at: https://learn.microsoft.com/en-us/windows-server/administration/server-
manager/server-manager
[Accessed 13 September 2022].
javatpoint, 2020. Kali Linux - Terminal - javatpoint. [Online]
Available at: https://www.javatpoint.com/kali-linux-
terminal#:~:text=Executing%20a%20command%20through%20terminal,shell%20and%2
0return%20the%20output.
[Accessed 1 December 2022].
TechTerms.com, 2009. Static Website Definition. [Online]
Available at: https://techterms.com/definition/staticwebsite
[Accessed 19 November 2022].

Aman Yadav 17

You might also like