Category: Tech Topic

Shell Command Test

The command test in the shell is used to check whether a condition is true. It can test numbers, strings and files. Number arguments test...

Shell Flow Control

The flow control of shell cannot be empty which is different from other languages ​​such as Java and PHP.The following is the writing of PHP...

Shell Command Printf

In the previous chapter we learn the command echo, this chapter we will introduce the command printf. Printf mimics the printf () program in the...

Shell Command Echo

Echo in shell is similar to the echo in PHP which all output string.The syntax for echo is: You can use echo to achieve more...

Shell Basic Operators

There are various operators supported by shell.We will now discuss the following operators: Arithmetic Operators Relational Operators Boolean Operators String Operators File Test Operators Bourne...

Shell Arrays

Shell arrays can hold multiple values,Bash shell only support one-dimensional values(can not support multi-dimensional) .We don’t need to define array size during initialization (similar to PHP).The...

Shell Passing Arguments

Arguments can be passed to the script when it is executed,we can get the arguments by the formats like $n.Inside the script, the $1 variable...

Shell Variable

When you define the a variable name, the name should not prefix $(excepting in PHP ),for example your_name="www.linuxcommands.site" We should not add blank space between...

Shell tutorial

The Shell is a program written in C language, it is a bridge use Linux users.The Shell is a command language and a programming language.Shell...

Directory structure and meaning of Linux system

After the login system, under the command window type the command:  You will see as shown in the figure below: Tree directory structure: The following is the explanation for these directories: /bin: Bin is the abbreviation of Binary, this directory holds the...

How to mount volume in docker container

Docker run use -v bind mount a volume. You can also modify the docker hostconfig.json and config.v2.json configuration files to mount volumes to existing docker...

How to set docker container host name

When we start a new container, the default host name is the container’s id. This host name is not only easy to remember, but also...