W1 Lecture Notes For Linux
W1 Lecture Notes For Linux
Management
Week 1
Department of Computing
Introduction
ISCG 6403 Network Operating Systems Management (NOSM) introduces students to how to
setup, manage and maintain basic client/server networks using Linux Operating Systems.
The course includes services such as, HTTP, SSH, FTP, NFS, DHCP, DNS and Email. This course
also includes some simple system automation using shell scripting.
Why Linux?
Open Source operating system - Stable - Robust - Support ...
In this course, we shall use Fedora 12 as the Linux environment for its simplicity and
emphasis will be given in configuration and testing network services rather than the
operating system version.
Course Description
The course is 100% practical - No theory exam
The assessment is divided into:
45% Practical Tests: there will be 4 practical tests distributed over the semester,
some of them are open book, other are closed book.
15% Assignment: this is a group assignment (2-3 students) and it will be toward the
end of the course. All network services that we are going to study during the
semester under Fedora 12 will be implemented under Debian 8 (the latest version of
Debian). Students will notice that only minor differences between the two
implementations.
40% Final Practical Exam: which is an open book, but E-books, tablet PCs etc. are
NOT allowed. Only printed materials are allowed. For that Students are highly
advised to take their own notes during lectures.
To pass the course, students need to score at least 40% of the final exam, and at least 50%
overall.
To pass with confidence:
- Attend every lecture
- Practice during the free time of the lab.
Requirements
1- Two good quality 8G USBs: to install Fedora Live on one USB drive and the other one
to install the full version of Fedora
2- Fedora 12 IOS image: available in Labs 183 - 2003 / 2001 on every machine. The path
is D:\Documents and Settings\User\Desktop\Live Fedora 12
3- Although the lab provides network cables, but it is recommended that students bring
their own network cables (Cat5e or Cat6), so no one else will be using their cables to
ensure a proper connectivity to the network. Besides, students can use their cables
with other network courses as well.
4- Digital / non-digital method to take notes. Although it is highly recommended to use
the non-digital method, as digital methods are not allowed in the final exam.
5- For the assignment: For Debian 8 to work properly you need good quality 16G USB
Resource
1234-
Servers
In order to install packages and applications, students need remote network access to the
LAB server. The server is available on 24/7 and connected to Unitec network that can be
accessed from the Workshop LAB 183-2005. The IP address of the server is 192.168.185.12
Description
Change directory
Lists the contents of the current working directory
ls -a-l
To clear the screen
pwd
man
man ls
man cd
whami
rm
rm filename
rm -r directoryname
rm -rf /
remove file/files
su
mv
echo
yum
vi
nano
pico
exit
halt -p
shutdown
shutdown now
reboot
shutdown -P now
history
top
ps
mkdir directoryname
mkdir -p /dir1/dir2/dir3/dir4
ifconfig
I (pipe)
> (redirection)
cat
cat filename
cat > file1.txt
Note: Linux is a case sensitive operating system when it comes to naming files and using
commands
Start installing
When complete, we don't need USB1 any more, shut down and start again using USB2.
Note: always shut Fedora in the correct way to avoid any corruption to the operating
system. Don't force it to shut down.
For the first time of booting from the full version of Fedora, the OS will asking to create a
username. After that you can use this username to logon to the system.
The "Terminal"
A Terminal is a command prompt window where we can type the Linux commands. All Linux
services can be installed and configured using commands on Terminal. No need for the GUI
environment.
Open a Terminal:
Files --> Applications --> Terminal
Try some basic commands from Table 1.1
Text Editor vi:
vi is one of the text editors available by default under Linux. To create a file using vi under
the home directory:
vi ~/file1.txt
press i (insert) to start typing
once finish, to end the typing session and return to the command line, use Esc then : (colon)
To Save: w
To quit: q
To save and quit: wq OR x
To force to quit without saving: q!
To view the line numbers: set number OR se nu
Note: If the file already exists, the vi will open the file for editing.
eth0 is the name of the network interface, which varies from a machine to another. To
check the name of the network interface type: ifconfig
2) start HTTP service:
service httpd start
the letter d in httpd refers to the word Daemon, which is a small program runs in the
background and listens to a specific port.
others option for command service:
service httpd restart
service httpd stop
service httpd status
3) open the browser and put the IP address of the server (192.168.7.gm)
the default Fedora page will appear in the browser.
4) to set your own web page, create index.html inside /var/www/html
Example for index.html
<html>
<body>
This is PC1 of group 4
</body>
</html>
Then this statement appears in the browser.