Introduction to Linux scripting and types of OS
Introduction to computer systems:
A computer is an electronic device that can be programmed to accept data (input), process it and generate result (output). A computer along with additional hardware and software together is called a computer system. A computer system primarily comprises a central processing unit (CPU), memory, input/output devices and storage devices. All these components function together as a single unit to deliver the desired output. A computer system comes in various forms and sizes. It can vary from a high-end server to personal desktop, laptop, tablet computer, or a smartphone.
Introduction to OS
All the computer systems have OS installed, it is a program that acts as an Interface between the system hardware and the user making the tasks easier. It is important software which runs on a computer and controls the set of instructions and wisely utilizes each part of the Computer.
Types of OS
Windows: It is also used in many offices because it gives you access to productivity tools such as calendars, word processors, and spreadsheets. It is a graphic user interface.
Linux: Server OS for web servers, database servers, file servers, email servers and any other type of shared server. Designed to support high-volume and multithreading applications, Linux is well-suited for all types of server applications. Desktop OS for personal productivity computing. It is command line interface.
Mac: It works hand in hand with iCloud to keep photos, documents and other stuff up to date on all your devices. It makes your Mac work like magic with your iPhone and other Apple devices.
Difference between Windows and Linux OS
Difference between Unix and Linux OS
Difference between GUI and CLI
Introduction to Linux OS
It is a free and open-source operating system and the source code can be modified and distributed to anyone commercially or noncommercially under the GNU General Public License.
Initially, Linux was created for personal computers and gradually it was used in other machines like servers, mainframe computers, supercomputers, etc. Nowadays, Linux is also used in embedded systems like routers, automation controls, televisions, digital video recorders, video game consoles, smartwatches, etc.
The biggest success of Linux is Android(operating system) it is based on the Linux kernel that is running on smartphones and tablets. Due to android Linux has the largest installed base of all general-purpose operating systems. Linux is generally packaged in a Linux distribution
The popular Linux distributions are:
MX Linux
Manjaro
Linux Mint
elementary
Ubuntu
Debian
Solus
Fedora
openSUSE
Deepin
Types of interfaces in OS
Kernel: It is a lowest level of software to have interface with computer hardware and its processors. It is a head of OS.
Shell: It acts as an interface between a user and a kernel.
Applications: All the activities can be stored into a file or a directory and have it as further usage.
Shell:
AS shell acts as an interface between user and a kernel we do all the operations in the shell using scripting language.
There are many scripting languages like Bash, Csh, Tcsh, Tcl, Perl, Python ..etc;
Unix commands:
We have few commands in Unix to create a file, directory, editing, copying, pasting and many more.
All the scripting in shell is done in terminal just as we do in command prompt in windows OS.
Let’s list out few commands that are most used in Unix.
General syntax of commands:
Command –option <argument>
Location of a file or directory:
One should know where our file or directory is located in our system, this could be represented using two methods.
Absolute path:
This describes the complete path of our file or directory.
/ = This indicates root and every path should always start root.
The first directory on any system will be “HOME” directory.
Eg: /home/user/pd/sta/timing
Relative path:
This uses few symbols to describe “HOME, CURRENT, PREVIOUS” directories.
./ = This indicates current directory
../ = This indicates previous directory
~ = This indicates home directory
Eg: cd ~ -> Changing from current directory to home directory
Eg: cp ../ ./ -> copying previous directory to current directory
3. To run particular command from history:
enter “history” in the shell and to execute a particular command let’s say it is 20th command then enter “!20” in shell this will execute the 20th command.
Comments
Post a Comment