for Loops in Shell Script

shell programming

for Loops in Shell Script for loops allow the repetition of a command for a specific set of values Syntax: for var in value1 value2 … do command_set done – command_set is executed with each value of var (value1, value2, …) in sequence for loop example in shell script #!/bin/sh # timestable – print out … Read more

Control Statements in Shell script

shell programming

Control Statements in Shell script Without control statements, execution within a shell scripts flows from one statement to the next in succession. Control statements control the flow of execution in a programming language The three most common types of control statements: – conditionals: if/then/else, case, … – loop statements: while, for, until, do, … – … Read more

Shell Script – Introduction to shell script

shell programming

Shell Script – Introduction to shell script Basically, a shell script is a text file with Unix commands in it. Shell scripts usually begin with a #! and a shell name – For example: #!/bin/sh – If they do not, the user’s current shell will be used Any Unix command can go in a shell … Read more

How to Install VLC 3.0 in CentOS 8/7/6

VLC (VideoLAN Client) is an open source and free simple fast and much powerful cross-platform player and framework for playing most of multimedia files like CD, DVD, VCD, Audio CD and other various supported streaming media protocols. It was written by the VideoLAN project and can be available for all operating platforms such as Windows, … Read more

WINDOWS VS. LINUX DESIGN

It is possible that email and browser-based viruses, Trojans and worms are the source of the myth that Windows is attacked more often than Linux. Clearly there are more desktop installations of Windows than Linux. It is certainly possible, if not probable, that Windows desktop software is attacked more often because Windows dominates the desktop. … Read more

FIREWALL SET UP

HOW TO SET UP A FIREWALL UNDER LINUX? To configure a Linux firewall, you will likely use the latest implementation of firewalling, called IPTables. IPTables is a packet filter for kernels 2.4 and above. It is a tremendous improvement over IPChains and provides enhanced features such as stateful packet filtering, Network Address Translation, MAC Address … Read more

PASSWORD FILE

/etc/passwd is a text file that contains the attributes of (i.e., basic information about) each user or account on a computer running Linux or another Unix-like operating system. DESIGN The permissions for /etc/passwd are by default set so that it is world readable, that is, so that it can be read by any user on … Read more

SHADOW FILE

SHADOW FILE In Unix-like operating systems, /etc/shadow is used to increase the security level of passwords by restricting all but highly privileged users’ access to hashed password data. Typically, that data is kept in files owned by and accessible only by the super user. DESIGN Systems administrators can reduce the likelihood of brute force attacks … Read more

LINUX DIRECTORY

LINUX DIRECTORY STRUCTURE (FILE SYSTEM STRUCTURE) EXPLAINED WITH EXAMPLES Figure: Linux file system 1. / – Root  Every single file and directory starts from the root directory.  Only root user has write privilege under this directory.  Please note that /root is root user‘s home directory, which is not same as /. 2. /bin – User … Read more

LAYERS OF LINUX/UNIX

LINUX/UNIX has three most important parts. They are Kernel, Shell and File System Figure: Layers of Linux Kernel Kernel is the heart of the operating system. It is the low level core of the System that is the interface between applications and H/W. Functions Manage Memory, I/O devices, allocates the time between user and process,inter … Read more