Docker is an open platform management tool for Linux Containers. It provides a means for developers and system administrators to build and package applications into lightweight containers. Docker consists of the following components: Docker Engine – A portable, lightweight runtime and packaging tool Docker Hub – A cloud service for sharing applications and automating workflows […]
DevOps
Beginners Guide to The Docker World
Docker: Introduction Docker is an open platform management tool for Linux Containers. It provides a means for developers and system administrators to build and package applications into lightweight containers. Docker consists of the following components: Docker Engine – A portable, lightweight runtime and packaging tool Docker Hub – A cloud service for sharing applications and […]
Understanding Positional Parameters (Passing Parameters/Arguments to Shell script)
The execution of scripts is made versatile by the ability to run a script based on arguments supplied on the command line. In this way, the operation of the script varies depending on what arguments are given to the script. The shell automatically assigns special variable names, called positional parameters, to each argument supplied to […]
Bash if loop examples (if then fi, if then elif fi, if then else fi)
The if Statement The if statement allows you to specify courses of action to be taken in a shell script, depending on the success or failure of some command. It is a conditional statement that allows a test before performing another statement. The syntax for the simplest form is: if [ condition ] then block_of_statements […]
What is the purpose of .bash_profile file under User Home Directory In Linux
What is the purpose of ~/.bash_profile file Apart from having a home directory to create and store files, users need an environment that gives them access to the tools and resources. When a user logs in to a system, the user’s work environment is determined by the initialization files. These initialization files are defined by […]
Understanding Variables in Bash Shell Under Linux
What are Variables? A variable is a temporary storage area in memory that is either set by the user, shell, system, or any program that loads another program. There are two categories of variables: The environment variables are valid for the duration of the session. The shell variables apply only to the current instance of […]
How to use command redirection under Linux
Shell metacharacters Shell metacharacters are specific characters, generally symbols, that have special meaning within the shell. The metacharacters supported in bash are listed as follows: | : Sends the output of the command to the left as the input to the command on the right of the symbol & : Runs the process in the […]
How to use shell expansions for generating shell tokens under Linux
Shell Expansions While working in a shell, sets or ranges of information are often repeated. Shell expansion helps generate a large number of shell tokens using compact syntaxes. The expansion is performed on the command line after the command is split into tokens. Of the many expansions available, the path name, file name, and brace […]
How to use command line shell functions in Linux
Functions, a powerful feature of shell programming, is a group of commands organized by common functionality. These easy-to-manage units, when called return a single value, and do not output anything. Using a function involves two steps: 1. Defining the function 2. Invoking the function Shell function Vs shell alias Shell functions and aliases are different […]
How to use shell aliases in Linux
What is an alias An alias is a shorthand shell notation that allows you to customize and abbreviate commands. Aliases are available in all shells. A common syntax to define an alias on command line is as follows: $ alias name=command_string If the first word on the command line is an alias, the shell replaces […]