Sie sind auf Seite 1von 14

A452 Practical Investigation

OCR GCSE Computing J275


Liam Jones
Centre number 58313
A452-Pratical investigation

Contents

Introduction
Methodology
Executive Summary
Conclusion
Sources
Glossary

Introduction
Linus Torvalds created Linux as an open-source kernel that was free to the public,
this lead on to the creation of many distribution operating systems of Linux such
as OpenSUSE, Fedora and Linux Mint. Each one works differently to the others.
Linux was originally developed as a free kernel for personal computers based on
the Intel x86 architecture, but has since been ported to more computer hardware
platforms than any other operating system. Android, which is built on top of the
Linux kernel, has the largest installed base of all general-purpose operating
systems. Linux is used a lot for server hosting because Linux systems are well
known for their ability to run for years without failure; in fact, many Linux users
have never seen a crash. In addition, Whereas Windows typically requires
frequent hardware upgrades to accommodate its ever-increasing resource
demands. Linux is slim, trim, flexible and scalable, and it performs admirably on
just about any computer, regardless of processor or machine architecture. Linux
is also innately more secure than Windows is, whether on the server, the desktop
or in an embedded environment. That's due largely to the fact that Linux, which
is based on UNIX, was designed from the start to be a multiuser operating
system. Only the administrator, or root user, has administrative privileges, and
fewer users and applications have permission to access the kernel or each other.
That keeps everything modular and protected it also is attacked less frequently
by viruses and malware, and vulnerabilities tend be found and fixed more quickly
by its legions of developers and users. With Linux, there is no commercial vendor
trying to lock you into certain products or protocols. Instead, you are free to mix,
match, and choose what works best for your business.
The task for A452 is to use, test and research the Linux engine. The purpose of
this unit is to investigate Linux and follow out tasks set by OCR. For these tasks
we used the Ubuntu 15.10 Linux distro which is a graphical user interface
operating system, we used the Ubuntu command line interface(typed commands
for inputs and navigation) in a remote system that allowed user to connect to it
from a different device. The Ubuntu command line has only a simple graphical
user interface that displays outputs and inputs but does not have interaction
menus.

Methodology
For this practical investigation, I will use qualitative research and quantitative
research. I will conduct my research for primary and secondary information and
recording all sources I use.
Qualitative research- finding information out, surveys, interviews and searching
for information
Quantitative research- quantifiable data and numbers
Primary research- Data you have collected your self
Secondary research- information from another source

Q1) Log in to your Linux computer. If necessary,


open a terminal window. You will see the
command prompt. Describe and explain each
part of the command prompt that you see.
I used PuTTY to connect to the Linux Kernel.
PuTTY is a virtual terminal emulator used for
remote login. To start with, I entered the IP
address (10.195.167.42) and port number. An IP
address is the internet protocol address, the
location of the computer you are connecting too.
The port number is a way to identify a specific process to which an
Internet or other network message is to be forwarded when it arrives at a
server. I used the port 22 which is an SSH network or secure shell which is
a cryptographic (encrypted) network protocol used to allow remote login.
Once I had entered both the Internet Protocol Address and port number, I
clicked the open button.
After I clicked, the open button on PuTTY Linux booted and opened asking
me to enter my login user and
password. After I logged in it
opened with the text Welcome
to Ubuntu 15.10 (GNU/Linux
4.2.0-16-generic x86_64). This
text is welcoming me to Ubuntu
version 15.10(the current version of Ubuntu that we are using) it also
states that it is working on a 64-bit version. 64-bit is to do with the
amount of virtual memory that programs can use, 64-bit software can
access more memory that 32-bit software. The Ubuntu menu also says
that a System restart required this is mostly stated because an
automated update is needed to be installed. It also mention the last time I
logged in and from what IP Address. The final $ is the command prompt
awaiting instructions and commands to be entered.

Similar tasks could be completed through the windows operating system.


To enter the command prompt you need to enter CMD at the run prompt.
This opens the DOS (Disk Operating System). As in Linux, I am told what
version I am running at
(Microsoft Windows [version
10.0.10240]) and copyright
notification. The command
prompt within DOS shows the
drive letter and the directory
currently being used. The
command prompt is ready to
receive commands.

Q2) At the command prompt, type ls and press Enter. Explain what
happens.

After logging in I typed in the


command ls and pressed
enter, this brings up the
subfolders in my current
directory. A directory is a file
that acts as a folder for other files. A directory can also contain
other directories (subdirectories); directory that contains another directory is called the
parent directory of the directory it contains. A similar command can be entered in

to CMD to bring up the directorys subfolders this command is dir short


for directory.A network manager would use ls to navigate the directorys
to find peoples folders and or edit them.
Q3)Type: ls | grep D Try other letters as well as D. Explain what happens
and how this is an example of a pipe.
ls | grep c is a directory search that
will search the directory for files
including the search parameter. For
example, I typed in ls | grep c and it
came up all of the subfolders in my
current directory that contained the letter c. grep searches files specified as
arguments.

In CMD you use find to search directory for files.


A network manager would use ls | grep c to search and navigate a
directory easier.

Q4) Enter the commands: ls > list and then ls >> list Explain how and
why these commands produce different results.

ls > list creates a new file name list and adds the contents of ls command
into that file, you can check the contents of the file list by typing the
command cat list. Ls >> list it will append the contents of the ls
command to the file named list. Therefore, the difference would be if you
execute this command 5 times, the output of ls command would be
written 5 times to the list file but for the first command every time, the
output would be overwritten.
This would be used in a networking aspect to organise, store ls and access
it in a more organised and easy to view format.
Q5) Try out the following commands and explain with screen shots what
they do:
cd ..
cd /etc
cd /
cd ~
cd .. Is used to go to the parent
directory of the current directory
this can be used to navigate the
directory and would be used by
a network admin to navigate around directories.
CMD uses the same command as linux to change directories with a
relative path.
A network specialist would use this to quickly go back to the last directory.
cd /ect is used to go
directly to a directory
Aka the search ability
used to search for
directorys.
Same command in
CMD.
A network specialist
would use this to
navigate between
directory directly and
quickly.

cd / back to root (highest


directory) directory and can be
used to quickly go to highest
directory.
A network specialist would use this to go to the root directory of the
current directory.
cd ~ returns you to the home directory.

Q8) There is a program called TREE. Install it from the command line.
Explain in full how you did this and how you overcame any problems, you
encountered.
Q9) Run TREE from your home directory. Explain and demonstrate what it
does. Use output redirection to do this.
Tree is a command that forms an
organised list of directories, subfolders
and files. Tree would be used by a
network engineer to view files in an
organised way.

Q10) (a) Navigate to the bin directory. Make a text file of the directory entries
that you find there, making sure that you display the attributes of all the files
stored there. You should direct the file to be stored in the yournameA452

directory that you created earlier. Make a screenshot of the contents of your
A452 directory to verify that this file has been stored there.

(b) One of the


lines in the file
should look
similar to this:
I copied the bin folder to LiamJonesA452 and named it
Liamtextfile.txt
This has all of the bin directorys in it and is easy to read.
The command line in DOS is xcopy c:\example
c:\example2 and does the same job as the Linux
command line.
A network expert could use this to form backups and hard
copys of the information for reference later.
ls l /bin > example.txt

-rwxr-xr-x 1 root root 920788 Mar 28 2013 bash Explain in detail what this entry
means.

(c) Explain, using examples, the purpose of the bin directory.


Essential command binaries that need to be available in single user mode; for all
users, e.g., cat, ls, cp.

Q11) Go to the root directory. From here, delete the copy of the text file
that you stored earlier in your
A452 directory. Explain how you did this.

Q12)A computer network usually has many users. It is useful when


administering a computer system to be able to add and delete users and
grant them privileges. If you put users into groups, such as teachers and
students, you can make it easier to look after the security of a system.
(a) Create ten new users for your Linux computer. Some should be
students and some should be teachers. Assign them all passwords.
In linux: sudo useradd username
In DOS: net user username password /ADD

(b) Create two groups called teachers and students. Assign the users to
their groups.
In linux: groupadd Teachers is used to create the group teachers
and sudo usermod a G Tearchers tearcher_x assigns the users to
the group.

In linux: groupadd students is used to create the group students


and sudo usermod a G students students_x assigns the users to
the group.
In DOS: net localgroup group-name /add
(c) Demonstrate that these users have been created and are assigned to
their correct groups. Explain how you performed these actions and
checked that they had been successful.
In Linux: grep ^group x/etc/group x = group name
This displays the users in each group.
In DOS: net localgroup group_name UserLoginName /add

Q13) Linux enables tasks which are regularly carried out to be automated
through the use of shell scripts. Plan, write and test a shell script that
could automate the task of creating new users and assigning them to
groups.

This copy of a bash script that requires a pass phrase or word to be


entered in order to continue. This could be used to password admin
privileges or directories.
While printf enter your password: ; do is a while loop that prints
a text.
read PASSWORD && echo e \n reads the password.
read PASSWORD2 && echo e \n reads the second password.
if [ $PASSWORD = $PASsWORD2 ]; then if the passwords are a
match it sets the password.

else echo e PASSWORDS DONT MATCH!!!\n if the passwords


dont match then the script prints the message.
Writing script in DOS works the same because the script is written initially
in source code before being complied and turned into object/machine
code.

Q14) Discuss how some of these tasks could have been done in a
computer system running Windows or another operating system. For each
question, I described how it would be performed in DOS at the end of each
question.

Conclusion
Throughout this project the tasks I was given helped me to understand
how Linux could be used in a networking environment and how it works as
an OS (operating system). With Linux Ubuntu, I learned that Linux
command line interface is extremely difficult to use, understand and
remember. Whereas a GUI would have probably been easy to get to grips
with, GUIs such as the Windows series OSs and the Ubuntu GUI would
have been easier to use but would have made answering some of the
questions more difficult such as describing command functions.
Linux command line as an OS fulfils its job as a network manager working
well as a command line interface, when compared to similar command
line OSs such as DOS and OpenVMS it performs very similar with only a
few differences in commands but still giving similar results. But when
compared to graphic user interfaces such as Microsoft Windows and
Chrome OS which both use far more hardware resources than a command
line interface OS but doesnt have the simplistic of visual user interaction.
Meaning Linux command line is good at what it does but requires
experience to understand it. Also windows compared to Linux is an off the
self OS whereas Linux is open source OS meaning windows was created to
make money and Linux was created for the public to alter and to make
fulfil jobs that they required.
I found these tasks very difficult being born into an era of graphical user
interfaces it made it very difficult to remember commands and
understand what the commands where doing (being unable to see what
they were doing) and also when compared to DOS the commands are far
more complex and difficult to remember. I found that the main problem
with this task was remembering commands and misspelling commands.

Sources
Script
photo

http://www.techremedy.net/blog/2010/
06/17-amazing-tutorials-for-creatingbash-scripts/
http://rutkaybeser.secureleaks.com/

Director
y photo
Read
http://linuxcommand.org/lts0070.php
write
permissi
on
diagram