UNIX Operating System Fundamentals

UNIX Operating System Fundamentals, What is UNIX?, Install UNIX operating System, UNIX OS Architecture, UNIX Commands, and Shell Scripting.

UNIX Operating environment knowledge is required for Network Administrators/System Administrators, Software Developers, and Software Testers,

Introduction to UNIX Operating System

  1. Introduction

  2. What is UNIX?

  3. Types of UNIX

  4. Features of Unix

  5. The Architecture of Unix

  6. Unix – File Management

  7. Basic Unix Commands

  8. UNIX Terminology

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

Knowing basic Unix commands should allow you to navigate your Unix or Linux system, confirm current system status and manage files or directories.

Command – Description

Getting help in Unix

man – view manual pages for Unix commands

Unix Shell Commands

clear – clear screen
history – show history of previous commands

Time and Date commands

date – show current date and time
sleep – wait for a given number of seconds
uptime – find out how long the system has been up

Unix users commands

id – print user identity
groups – show which groups the user belongs to
passwd – change user password
who – find out who is logged into the system

Unix file operations

ls – list files and directories
cp – copy files (work in progress)
rm – remove files and directories (work in progress)
mv – rename or move files and directories to another location
chmod – change file/directory access permissions

Text file operations in Unix

cat – concatenate files and show contents to the standard output
more – basic pagination when viewing text files or parsing Unix commands output
less – an improved pagination tool for viewing text files (better than more command)
head – show the first 10 lines of text file (you can specify any number of lines)
tail – show the last 10 lines of text file (any number can be specified)
grep – search for patterns in text files

Unix directory management commands

cd – change directory
pwd – confirm current directory
ln – make links and symlinks to files and directories
mkdir – make new directory
rmdir – remove directories in Unix

Unix system status commands

hostname – show or set server hostname
shutdown – graceful shutdown and reboot of your system
halt – ungraceful (without stopping OS services) shutdown
reboot – ungraceful reboot (without stopping OS services)

Networking commands in Unix

ip – show and set IP addresses (in recent Linux versions)
ping – check if the remote host is reachable via ICMP ping
netstat – show network stats and routing information

Process management

ps – list processes
top – show tasks and system status
kill – kill a process (stop application running)

File transfer commands

ftp – clear-text (insecure!) File Transfer Protocol client
wget – download files from remote servers, HTTP/HTTPS and FTP

Others:

telnet – clear-text (insecure) remote access protocol


8. UNIX Terminology

background process – running a program such that its parent does not wait for its completion.

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.

shell script – a file containing shell commands to perform a specific task. Also called a shell program.

terminal: Device or Program used to establish a connection to the UNIX server.

zombie – a dead process whose parent has not terminated it properly.


UNIX Knowledge For Software Testers

To conduct Software Testing on UNIX or UNIX-like operating environment then Software Testers require UNIX Operating system knowledge.

UNIX Knowledge for Software Testers
UNIX Introduction Video
Follow me on social media: