Assignment No 1: Use and Study of Linux GUI and Commands


Lab Manual 

GROUP A ASSIGNMENTS

Assignment No A1:

Aim: Use and Study of Linux GUI and Commands.

Theory:

Introduction of Linux Operating System:
Linux is a UNIX-base operating system. Its original creator was a Finnish student's name Linus
Torvalds, although being, open source‟ it has changed a great deal since its original conception. It
belongs to nobody, and is free to download and use. Any changes to it are open for all to adopt,
And as a result, it has developed into a very powerful OS that is rapidly gaining in popularity
Worldwide, particularly among those seeking an alternative to Windows.
Advantages and Benefits of Linux
One of the significant benefits of open source software such as Linux is that because it has no
Owner, it can be debugged without resource to a license owner or software proprietor. Businesses
Therefore have the flexibility to do as they wish with the OS without having to worry about
Conforming to complex license agreements.
The major advantage of Linux is its cost: the core OS is free, while many software applications
Also come with a GNU General Public License. It can also be used simultaneously by large
numbers of users without slowing down or freezing and it is very fast. It is an excellent
Networking platform and performs at optimum efficiency even with less available hard disk
space.
Linux also runs on a wide range of hardware types, including PCs, Macs, mainframes,
Supercomputers, some cell phones and industrial robots. Some prefer to dual-boot Linux and
Windows while others prefer Linux and Mac OS. System76 machines come pre-installed with
Linux in the form of Ubuntu, a Debian distribution of Linux. This is the most popular
distribution of Linux for laptops.
Linux Vs Windows
The main benefits and advantages of Linux over other operating systems, particularly Microsoft
Windows, are:

  •  It is free to use and distribute.
  • Support is free through online help sites, blogs and forums.
  • It is very reliable – more so than most other operating systems with very few crashes.
  •  A huge amount of free open source software has been developed for it.
  • It is very resistant to malware such as spyware, adware and viruses.
  • It runs in a wide variety of machines than cannot be updated to use newer Windows versions.Since the source code is visible, „backdoors‟ are easily spotted, so Linux offers greater security for sensitive applications.
  • Linux offers a high degree of flexibility of configuration, and significant customization is possible without modifying the source code.
Components of Linux System
Linux Operating System has primarily three components

  • Kernel - Kernel is the core part of Linux. It is responsible for all major activities of this operating system. It is consists of various modules and it interacts directly with the underlying hardware. Kernel provides the required abstraction to hide low level hardware details to system or application programs.
  • System Library - System libraries are special functions or programs using which application programs or system utilities accesses Kernel's features. These libraries implements most of the functionalities of the operating system and do not requires kernel module's code access rights.
  • System Utility - System Utility programs are responsible to do specialized, individual level tasks.
Kernel Mode vs User Mode
            Kernel component code executes in a special privileged mode called kernel mode with full
access to all resources of the computer. This code represents a single process, executes in single
address space and do not require any context switch and hence is very efficient and fast. Kernel
runs each processes and provides system services to processes, provides protected access to
hardwares to processes.
           Support code which is not required to run in kernel mode is in System Library. User programs
and other system programs works in User Mode which has no access to system hardwares and
kernel code. User programs/ utilities use System libraries to access Kernel functions to get
system's low level tasks.
Basic Features:
Following are some of the important features of Linux Operating System.

  • Portable - Portability means softwares can works on different types of hardwares in same way.Linux kernel and application programs supports their installation on any kind of hardware platform.
  • Open Source - Linux source code is freely available and it is community based development project. Multiple teams works in collaboration to enhance the capability of Linux operating system and it is continuously evolving.
  • Multi-User - Linux is a multiuser system means multiple users can access system resources like memory/ ram/ application programs at same time.
  • Multiprogramming - Linux is a multiprogramming system means multiple applications can run at same time.
  • Hierarchical File System - Linux provides a standard file structure in which system files/ user files are arranged.
  • Shell - Linux provides a special interpreter program which can be used to execute commands of the operating system. It can be used to do various types of operations, call application programs etc.
  • Security - Linux provides user security using authentication features like password protection/ controlled access to specific files/ encryption of data.
Architecture:
Linux System Architecture is consists of following layers

  • Hardware layer - Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc).
  • Kernel - Core component of Operating System, interacts directly with hardware, provides low level services to upper layer components.
  • Shell - An interface to kernel, hiding complexity of kernel's functions from users. Takes commands from user and executes kernel's functions.
  • Utilities - Utility programs giving user most of the functionalities of an operating systems.
Linux Commands:
# 1: cd
The "Change Directory" command enables you to navigate to another directory.
The cd command is THE most important command there is in linux i think. As the command
suggests, it enables the user to change / jump to a directory.
Example: cd Downloads
Example: cd /etc/
Example: cd .. (Directory up!)
note: After you have typed cd and entering the first or two letters of the directory you can press
the TAB key to autocomplete the directory! so... cd Do (press tabkey) will autocomplete it to
Downloads. i use this a lot <--
#2: man
The man command shows the users the "manual" of the command. In some situation you might
need to get more information about the command you are using. The man command shows you
this information about the command.
Example: man cp
This will open up the "cp" manual document for us in the shell. The manual shows us the
parameters available for the commands.
note: To close the manual simply press "Q".
#3: ls
In the absolute top 15 there's no way the ls command is missing. On the third place, the ls
command. The ls command is used to list the files/directories within a directory.
Example: ls
It shows us the directories available.
 #4: cp
The cp command is available for us to "Copy" things. This might be usefull for duplicating files
f.e.
Example: cp file file2
note: file is on this case the file the user wants to be copied... file2 is the name of the copied file.
It's that simple.
#5 mv
The mv command is used for "Move" operations. The mv commands enables the users to move a
file/directory to a specified location.
Example: mv /home/bas/Desktop/bla /home/bas/Desktop/fiets
note: the first part of the command is the file that has to be moved. The second part (after the
whitespace) is the target directory. Make sure you type in the full path using this command!
#6 mkdir
This command is used to "make" directories, NOT Files.. (thit is possible with another command
which i will bring up later in this tutorial)
Example: mkdir testdirectory
note: The name of the directory is case sensitive which means that Testdirectory is a complete
different directory as testdirectory.
#7 rmdir
When you are able to make directories, you also want to know how to remove them. Removing
directories is done by the rmdir command and belongs to the absolute basic commands in shell
bashing.
Example: rmdir fiets
note: When the directory is not empty the command will prompt an error message:
rmdir: failed to remove `fiets': Directory not empty
So make sure it's completely empty before removing it.
#8 touch
Now we know how to make directories and deleting them, i now want to use the touch
command. The touch command is used to make files.
Example: touch vogel
This will create the file vogel for us in the directory.
#9 rm
The rm command stand for remove. The rm command is used in order the delete files instead of
directories.
Example: rm vogel
note: To remove files you must have the right permission bits set on the specific file.
#10 tar
Sometimes you have to archive files. Archiving files is a way to pack a set of files to one single
file. The operation is done by the tar command.
Example: tar -cvf test.tar test (Creating a tar file from directory or file test)
Example: tar -xvf test.tar myexctractfolder (Extracts the particular tar file in the current working
directory)
In the example i used parameters. These parameters are telling the tar command how to behave
and how to execute. After the parameters i entered the name of the file which is test.tar. The
second part is the source directory/file of the tar file. In this situation a directory called test.
#11 pwd
Sometimes you really wonder where you are in the system. PWD is the solution for that problem.
PWD stands for Path Working Directory.
Example: pwd
#12 ifconfig
ifconfig is a command showing you information about the ethernet adapters on your system. It
contains very usefull information like gateway, ip, and packet statistics. For the average user this
command is rarely used, but i think it's worth knowing it.
Example: ifconfig
note: To gain information about the wireless adapters on your system type iwconfig.
#13 locate
Locate is an extremely fast seaching command. It shows the directories or files each on a new
line.
Example: locate syslog
Example: locate syslog | more (Piping structure used to invert the data from locate to the more
command)
note: Some keywords returns enormous ammounts of hits. Use MORE to (see example) clear
things up a bit.
#14 ping
Ping is used as a network diagnostic command by professionals. Ping offers information about
the network we are on and if the other system responds to us. In cases of troubleshooting
network related problems, ping can do a great job to determine the domain of the problem.
Example: ping www.google.com
The command returns the interval and % of loss during the test.
Conclusion: Hence given linux commands are successfully implemented.

0 comments:

Post a Comment