You are on page 1of 4

Unix

1. Introduction:

A computer system contains hardware and software components. We can install and use many types
of software on our computers. The software’s on the computer is distinguished into two types –
System software and application software.
The system software is specially designed to provide a platform for other software on the computer.
An operating system is an example of system software. Application Softwares are the user-defined
software that works on the system software.
Application software can be customized by the users, whereas it is not possible for the system
software. Example of the application software is File viewer, spreadsheet, games, etc.

2. What is UNIX?

UNIX is an operating system that was first developed in the 1960s and has been under constant
development ever since. It is a stable, multi-user, multi-tasking system for servers, desktops, and
laptops.

3. Types of UNIX

There are many different versions of UNIX, although they share common similarities. The most
popular varieties of UNIX are Sun Solaris, GNU/Linux, and Mac (Macintosh) OS.
Linux:  Linux is a family of open-source Unix-like operating systems based on the Linux kernel, an
operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically
packaged in a Linux distribution.
Distributions include the Linux kernel and supporting system software and libraries, many of which
are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but
the Free Software Foundation uses the name “GNU/Linux” to emphasize the importance of GNU
software.
Popular Linux distributions include Debian, Fedora, and Ubuntu.
Commercial distributions include Red Hat Enterprise Linux and SUSE Linux Enterprise Server.
Solaris: Solaris is a proprietary Unix operating system originally developed by Sun Microsystems.
It superseded the company’s earlier SunOS in 1993. In 2010, after the Sun acquisition by Oracle, it
was renamed Oracle Solaris.
macOS: macOS (previously Mac OS X and later OS X) is a series of proprietary graphical
operating systems developed and marketed by Apple Inc. since 2001. It is the primary operating
system for Apple’s Mac computers. Within the market of desktop, laptop, and home computers, and
by web usage, it is the second most widely used desktop OS, after Microsoft Windows .

4. Features of Unix

 UNIX is a multi-user system where the same resources can be shared by different users.
 UNIX provides multi-tasking, wherein each user can execute many processes at the same
time.
 UNIX was the first operating system that was written in a high-level language (C Language).
This made it easy to port to other machines with minimum adaptations.
 UNIX provides a hierarchical file structure that allows easier access and maintenance of data.
 Unix has built-in networking functions so that different users can easily exchange
information.
 Unix functionality can be extended through user programs built on a standard programming
interface.
 Access controls and security. All users must be authenticated by a valid account and
password to use the system at all.
 A rich set of small commands and utilities that do specific tasks well.
 Ability to string commands and utilities together in unlimited ways to accomplish more
complicated tasks.
 A powerfully unified file system. Everything is a file: data, programs, and all physical devices.
 Available on a wide variety of machines – the most truly portable operating system.
 Optimized for program development, and thus for the unusual circumstances that are the
rule in research.

5 The Architecture of Unix

Unix has a graphical user interface similar to the Windows operating system that makes it easy for
navigation and a good supportive environment.

The main concept that unites all the versions of Unix is the following four basics −

Kernel: The kernel is the heart of the operating system. It interacts with the hardware and most of
the tasks like memory management, task scheduling and file management.
Shell: The shell is the utility that processes your requests. When you type in a command at your
terminal, the shell interprets the command and calls the program that you want. The shell uses
standard syntax for all commands. C Shell, Bourne Shell, and Korn Shell are the most famous shells
which are available with most of the Unix variants.
Commands and Utilities: There are various commands and utilities which you can make use of in
your day-to-day activities. cp, mv, cat and grep, etc. are few examples of commands and utilities.
There are over 250 standard commands plus numerous others provided through 3rd party software.
All the commands come along with various options.
Files and Directories: All the data of Unix is organized into files. All files are then organized into
directories. These directories are further organized into a tree-like structure called the filesystem.

6. Unix – File Management

 All data in Unix is organized into files.


 All files are organized into directories.
 All directories are organized into a tree-like structure called the filesystem.

When you work with Unix, one way or another, you spend most of your time working with files.
In Unix, there are three basic types of files −

Ordinary Files:
An ordinary file is a file on the system that contains data, text, or program instructions. In this
tutorial, you look at working with ordinary files.

Directories:
Directories store both special and ordinary files. For users familiar with Windows or Mac OS, Unix
directories are equivalent to folders.
Special Files:
Some special files provide access to hardware such as hard drives, CD-ROM drives, modems, and
Ethernet adapters. Other special files are similar to aliases or shortcuts and enable you to access a
single file using different names.

7. Basic Unix Commands:

UNIX Knowledge For Software Testers text files (better than more command)
head – show the first 10 lines of text file (you can
Knowing basic Unix commands should allow you specify any number of lines)
to navigate your Unix or Linux system, confirm tail – show the last 10 lines of text file (any
current system status and manage files or number can be specified)
directories. grep – search for patterns in text files

Command – Description Unix directory management commands

Getting help in Unix cd – change directory


pwd – confirm current directory
man – view manual pages for Unix commands ln – make links and symlinks to files and
directories
Unix Shell Commands mkdir – make new directory
rmdir – remove directories in Unix
clear – clear screen
history – show history of previous commands Unix system status commands

Time and Date commands hostname – show or set server hostname


shutdown – graceful shutdown and reboot of
date – show current date and time your system
sleep – wait for a given number of seconds halt – ungraceful (without stopping OS services)
uptime – find out how long the system has been shutdown
up reboot – ungraceful reboot (without stopping OS
services)
Unix users commands
Networking commands in Unix
id – print user identity
groups – show which groups the user belongs to ip – show and set IP addresses (in recent Linux
passwd – change user password versions)
who – find out who is logged into the system ping – check if the remote host is reachable via
ICMP ping
Unix file operations netstat – show network stats and routing
information
ls – list files and directories
cp – copy files (work in progress) Process management
rm – remove files and directories (work in
progress) ps – list processes
mv – rename or move files and directories to top – show tasks and system status
another location kill – kill a process (stop application running)
chmod – change file/directory access permissions
File transfer commands
Text file operations in Unix
ftp – clear-text (insecure!) File Transfer Protocol
cat – concatenate files and show contents to the client
standard output wget – download files from remote servers,
more – basic pagination when viewing text files HTTP/HTTPS and FTP
or parsing Unix commands output
less – an improved pagination tool for viewing Others:
telnet – clear-text (insecure) remote access shell script – a file containing shell
protocol commands to perform a specific task. Also
called a shell program.

terminal: Device or Program used to


background process – running a program establish a connection to the UNIX server.
such that its parent does not wait for its
completion. zombie – a dead process whose parent has
not terminated it properly.
child process – a process that has been
created from a parent process.

command-line: The text-interface you use


to interact with the shell.

GNU – an acronym for GNU’s Not Unix, GNU


is an organization founded by Richard
Stallman. Many of the tools and bits of the
Linux operating system were developed by
GNU or under GNU’s public license.

home directory – the directory location


where a user resides upon login, as specified
in the /etc/passwd file (in the last field). Also
the default location when the cd command is
used without arguments.

job – a name for a running program, typically


a running program of some duration.

kernel – the core portion of the operating


system that maintains control of the
hardware. The kernel is memory resident from
the boot process until system shutdown.

process – a program that has been loaded


into memory and is in a state of execution. A
process is an instance of a running program.

prompt – the location or position in a


terminal window where a user enters a
command. The prompt will typically be a
single simple character, such as the “$”
character.

shell – a program that typically runs at each


logged-in terminal which serves as the
interpreter for user commands. The shell
interprets a user’s command, checks the
commands validity and interfaces with the
kernel in executing the command. There are
many different shell programs.

You might also like