26 May 2023

What is the Linux And basic commands


“Linux” refers to the operating system kernel on which Red Hat Enterprise Linux (RHEL) is built. The open-source Linux kernel provides the fundamental features and services required for an operating system to run on hardware, modeled after the Unix operating system.

In addition to the Linux kernel, system utilities, libraries, and software packages, RHEL is a Linux distribution. It offers a dependable, supported, and enterprise-level deployment-ready platform for companies and organizations.

As an operating system kernel, Linux takes care of crucial tasks like process management, memory management, device drivers, file systems, networking, and security. It serves as a bridge between the hardware and software layers, enabling system services and applications to communicate with the underlying hardware resources.

Built on the Linux kernel, RHEL enhances the Linux operating system’s capabilities by incorporating business-class features, security improvements, management tools, and ongoing support. It is frequently utilized in server environments, cloud infrastructure, and other business applications.

Additionally, RHEL supports a broad variety of open-source software packages and tools, giving administrators and developers access to a robust ecosystem for the creation and deployment of applications

It’s crucial to remember that while Linux is the operating system’s foundation, RHEL is the distribution that combines the Linux kernel with other software elements to produce an entire operating system that is appropriate for use in business settings.

The kernel of an operating system is Linux. You may be familiar with UNIX. Linux is, in fact, a copy of UNIX. But Linus Torvalds essentially started from scratch to construct it. Since Linux is free and open-source, you can easily modify it and re-distribute it under your own name! Numerous Linux distributions exist; they are referred to as “distros”.

Linux flavours Name 

Ubuntu Linux
Red Hat Enterprise Linux
Linux Mint
Elementary OS
MX Linux
Pop_OS! (from System76)
And ( ETC ) 

Servers primarily utilize Linux. Linux servers are used to power almost 90% of the internet. This is due to Linux’s speed, security, and affordability! The expense of using Windows servers is the biggest issue. Linux servers can be used to resolve this. The Linux kernel also serves as the foundation for Android, the operating system that powers about 80% of smartphones worldwide. The majority of viruses operate on Windows, but not on Linux!

The Linux shell, sometimes known as “Terminal” 

So, in essence, a shell is a program that takes user commands, passes them through to the OS for processing, and then displays the results. Its key component is the Linux shell. Although some of its distributions have a GI (graphical user interface), Linux primarily uses a CLI. We’ll go over the fundamental commands used in the Linux shell in this tutorial.

Linux basic commands 

1. ls Red Hat Enterprise Linux (RHEL) uses the ls command to list the files and directories that are present in a directory. If no directory is supplied, the names of the files and directories in the current working directory are displayed.

The basic syntax of the ls command is:

ls [options] [directory]

The following are a few frequently used ls command options in RHEL:

( 1 ) Ls – l  Detailed information about files and directories is displayed in a long format.
( 2 ) ls -a reveals hidden files (those with a dot in the name).
( 3 ) ls -h Human-readable file sizes.
( 4 ) ls -t Sorts files and folders based on the most recent modification date
( 5 ) ls -r Reverse the listing’s order.
( 6 ) ls -R List the files and directories in every subdirectory.
( 7 ) ls -I Identify each file’s and directory’s inode number.

2. cd: Change the current working directory in the command-line interface (CLI) of Red Hat Enterprise Linux (RHEL) by using the cd command. You can use it to move about the file system’s various directories

cd [directory]

The following are some crucial details concerning the cd command:

( 1 ) The cd will take you to your home directory if you run it without specifying a directory.
( 2 ) You can specify either an absolute path (beginning with /) or a relative path to get to a specific directory.
( 3 ) An absolute path identifies the full directory path starting at the file system’s root.
( 4 ) The directory path relative to the active working directory is specified via a relative path.

The cd command supports the following special symbols:

. The symbol denotes the current directory.
.. stands for the parent directory (the previous level).
~ The user’s home directory is represented by.

Following are a few instances of how to use the cd command in RHEL:

1 Make a home directory change:


2 Using an absolute path, navigate to a particular directory:

cd /path/to/directory

3 Making use of a relative path, change to a certain directory:

cd relative/directory/path

4 to reach the parent directory, move up one level:

cd ..

5 Navigate to the current directory (helpful if you unintentionally execute cd without any arguments):

cd .

6 The user’s home directory is changed:

cd ~

3. pwd: The pwd command can be used in the command-line interface (CLI) of Red Hat Enterprise Linux (RHEL) to print the current working directory. It shows you the directory’s absolute path at the moment.

The pwd command’s syntax is straightforward:


The full path to the current working directory is output when you use the pwd command.

1. Here is an illustration of how to use the pwd command in RHEL:



( 1 ) The result in this case shows the working directory’s absolute path as /home/user/Documents. It displays the user’s current location as being in the “Documents” directory.

( 2 ) The pwd command comes in handy when you need to reference the entire path for other commands or scripts or when you want to confirm the current directory.

( 3 ) The pwd command does not accept any parameters, which is a crucial distinction. It only shows the working directory at the moment.4

4. date: The date command in the command-line interface (CLI) of Red Hat Enterprise Linux (RHEL) is used to display or set the system date and time. It offers details on the time, date, and other relevant parameters as of right now.

( 1 ) The date command provides a number of parameters that let you alter the system date and time or customize the output. Here are a few frequently chosen choices:

( 2 ) -u or –utc: Use Coordinated Universal Time (UTC) rather than the local time zone to display or set the date and time.

( 3 ) -R or –rfc-2822: Show the time and date in RFC 2822 format.

( 4 ) +%format:  Display the time and date in a particular format. For instance, %Y stands for the year, %m for the month, %d for the day, %H for the hour in 24-hour format, %M for the minute, and %S for the second.

Here are a few instances of how to use RHEL’s date command:

1. Show the time and date as of right now:


2. The time and date will be shown in UTC:

date -u

3. show the time and date in a particular format:

date "+%Y-%m-%d %H:%M:%S"

5. mkdir: The mkdir command is used in the command-line interface (CLI) of Red Hat Enterprise Linux (RHEL) to create new directories (folders). With certain names and settings, it enables you to establish one or more directories.

The mkdir command’s fundamental syntax is as follows

mkdir [options] directory_name

( 1 ) The following are some critical details regarding the mkdir command:

( 2 ) Multiple directory names can be specified, separated by spaces, and mkdir will create each one at once.

( 3 ) The mkdir command typically creates folders in the location of the active working directory.

( 4 ) To create folders in a specified area within the file system, you can specify an absolute path.

( 5 ) Use the -p option to create the target directory and any parent directories in the path if they don’t already exist.

Here are a few instances of how to use RHEL’s mkdir command

1. In the directory where you are working, make a single directory:

mkdir directory_name

2. In the current working directory, make a number of directories:

mkdir dir1 dir2 dir3

3 A directory with the given path should be created:

mkdir /path/to/directory

4 If parent directories don’t already exist, create them.

mkdir -p /path/to/new/directory

Remember to substitute the desired name or path for the directory you want to create for directory_name or /path/to/directory.

The ls command can be used to confirm that the directories have been correctly created after running the mkdir command.

6. rmdir:  The rmdir command in Red Hat Enterprise Linux (RHEL)’s command-line interface (CLI) is used to delete empty directories (folders). You can eliminate folders that are empty of files or subdirectories

The rmdir command has the following basic syntax:

rmdir [options] directory_name

( 1 ) The following are key information regarding the rmdir command:

( 2 ) Only empty directories can be deleted with the rmdir command. A directory won’t be erased if it has any files or subdirectories.

( 3 ) The current working directory is where the rmdir command works by default.

( 4 ) To define the location of the directory you want to remove, you can offer an absolute path.

 Here is an illustration of how to use the rmdir command in RHEL:

1. In the current working directory, delete the empty directory:

rmdir directory_name

2. A given path should be used to remove an empty directory:

rmdir /path/to/directory

Always use the correct name or path when replacing directory_name or /path/to/directory with an empty directory that you wish to remove.

An error message stating that the directory is not empty will be displayed if you try to use the rmdir command on a non-empty directory. To remove the directory and its contents recursively in that situation, you might need to run the rm command with the right arguments.

To prevent mistakenly deleting significant files or directories, it is always a good idea to double-check the contents of a directory before executing the rmdir command.

7. mv: The mv command can be used in the command-line interface (CLI) of Red Hat Enterprise Linux (RHEL) to move or rename files and directories. You can use it to modify the name or placement of a file or directory within the file system.

The mv command’s fundamental syntax is:

mv [options] source destination

The following are some critical details of the mv command:

( 1 ) The file or directory that you want to transfer or rename is represented by source.

( 2 ) destination denotes the new name or intended location for the file or directory.

( 3 ) The source will be relocated into the destination directory if it already exists. The source will be moved and/or renamed appropriately if the destination is a directory that doesn’t exist or has a different name.

( 4 ) To transfer or rename files and directories across various locations in the file system, you can specify absolute paths for both the source and destination.

Following are a few instances of how to use the mv command in RHEL:

1 Change the directory where a file is located:

mv file.txt /path/to/directory/

2 Change a directory’s location and all of its contents:

mv directory /path/to/new/location/

3 rename a directory or file:

mv old_name.txt new_name.txt

4 Moving and renaming a file or directory at the same time:

mv source.txt /path/to/new/location/new_name.txt

Keep in mind to substitute the proper file or directory names and paths according to your requirements for file.txt, directory, old_name.txt, or /path/to.

Additional parameters that can be used with the mv command include preserving file characteristics, forcing overwrites, and showing verbose output. To view all of the options available, use the man mv command in the terminal to access the mv command’s documentation page.

8. cp: The cp command can be used in the command-line interface (CLI) of Red Hat Enterprise Linux (RHEL) to copy files and directories. You can use it to duplicate files and directories to a different position in the file system or to the same area inside the file system.

The cp command’s standard syntax is

cp [options] source destination

( 1 ) The following are some crucial details of the cp command:

( 2 ) The file or location you want to copy is represented by the source.

( 3 ) The target location where the duplicate will be generated is represented by the destination.

( 4 ) The source will be copied into the destination directory if it already exists. The source will be copied and/or renamed appropriately if the destination is a directory that doesn’t exist or has a different name.

( 5 ) If you want to move files and directories between various places in the file system, you can do so by giving absolute paths for both the source and destination.

Following are a few instances of how to use the cp command in RHEL:

1 A file should be copied to a different directory:

cp file.txt /path/to/directory/

2 Copy the contents of a directory to another directory:

cp -r directory /path/to/new/location/

Note: To copy folders and their contents recursively, use the -r option.

3 Renaming a file after a copy has been made:

cp old_name.txt new_name.txt

4 Copying a file or directory while keeping its permissions and timestamps intact:

cp -a source destination

Note: To maintain file attributes, use the -a option.

Keep in mind to substitute the proper file or directory names and paths according to your requirements for file.txt, directory, old_name.txt, or /path/to.

Additional parameters for the cp command include maintaining links, forcing overwrites, and displaying verbose output, among other things. Man cp can be used in the terminal to investigate all of the options available by referring to the cp command’s documentation page.

9. touch:  The touch command in the command-line interface (CLI) of Red Hat Enterprise Linux (RHEL) is used to create new files or change the timestamp of existing files. Empty files can be created or the access and modification times of existing files changed often.

The touch command’s basic syntax is as follows:

touch [options] file_name

The following are some significant details concerning the touch command:

( 1 ) The touch command creates a brand-new, empty file with the supplied file_name if it doesn’t already exist.

( 2 ) The touch command adjusts the access and modification timestamps of the file to the current time by default if the file_name already exists.

( 3 ) The touch command by default adds or modifies a single file’s timestamp.

( 4 )To simultaneously create or update the timestamps of several files, you can use multiple file_name parameters.

Listed below are a few instances of how to use the touch command in RHEL:

1 Make a fresh, blank file:

touch file.txt

2 Put the most recent time in an existing file’s timestamp:

touch existing_file.txt

3 Make a number of blank files:

touch file1.txt file2.txt file3.txt

4 Add the current time to the timestamps of numerous existing files:

touch file1.txt file2.txt file3.txt

Keep in mind to substitute file.txt, existing_file.txt, or file1.txt, file2.txt, and file3.txt with the appropriate file names to meet your needs.

A precise timestamp can be specified, file characteristics can be adjusted, and verbose output can be displayed using additional options that are included with the touch command. The command man touch in the terminal can be used to investigate all of the options available by referring to the manual page for the touch command.

10. find Using a variety of criteria, the find command in Red Hat Enterprise Linux (RHEL) can be used to search for files and directories inside a directory hierarchy. With the use of criteria like name patterns, file kinds, sizes, timestamps, and more, you may find files and folders that meet your requirements.

The find command’s fundamental syntax is as follows:

find [path] [options] [expression]

( 1 ) What you should know about the search command includes the following:

( 2 ) The search’s initial directory is represented by [path]. The current directory is used as the starting point if none is provided.

( 3 ) [Options] offer other search settings, including restricting the depth, omitting specific directories, or regulating the output format.

( 4 ) [expression] gives the search parameters or the operations to be carried out on the files and directories that are found.

The search command in RHEL can be used in the following situations:

1. In the current directory and its subdirectories, look for files with a certain name:

find . -name "filename.txt"

2. Search for directories bearing a particular name and remove them (use with caution):

find . -type d -name "directory_name" -exec rm -r {} \;

3. Get files that are bigger than a certain size:

find /path/to/search -type f -size +1M

4 Search for files edited within a certain time frame:

find /path/to/search -type f -newermt "2022-01-01" ! -newermt "2022-12-31"

Keep in mind to substitute the appropriate numbers or patterns for filename.txt, directory_name, /path/to/search, or the date range to meet your needs.

With the find command, you may narrow down your search using a variety of arguments and phrases. The logical operators (-a, -o, and!) allow you to combine several expressions and carry out sophisticated searches. For more information on all of the available options and phrases, use the man find command in the terminal.

11 .tar: When using the command-line interface (CLI) in Red Hat Enterprise Linux (RHEL), the tar command is used to generate and modify archive files. It is frequently used to extract or list the contents of preexisting archive files as well as combine numerous files and folders into a single archive file.

In addition to archive operations, the tar command supports a number of compression techniques, including gzip (*.tar.gz), bzip2 (*.tar.bz2), and xz (*.tar.xz).
The tar command’s fundamental syntax is as follows:

tar [options] archive_file files/directories

( 1 ) The tar command has the following key information that you should be aware of:

( 2 ) The name of the archive file that is going to be generated or modified is represented by the archive_file argument. It can have extensions that match the compression scheme being used (such as.tar.gz,.tar.bz2, or.tar.xz), or it can only have the extension.tar for an uncompressed archive.

( 3 ) The parameter files/directories represent the directories or files that should be included in the archive. By separating them with spaces, you can specify the number of files and directories.

( 4 ) The tar command can generate, extract, or update archive files depending on the operation and arguments chosen.

Here are some instances of how to use the tar command in RHEL:

1 Compress data into an archive:

tar -czvf archive.tar.gz file1.txt file2.txt directory/

File1.txt, File2.txt, and the directory/ directory are all created in a compressed archive file called archive.tar.gz by this command.

2 Take files out of an archive:

tar -xzvf archive.tar.gz

The archive.tar.gz file’s contents are extracted with this command and placed in the current directory.

3 An archive’s contents are listed below:

tar -tvf archive.tar.gz

A thorough list of the files and folders found in the archive.tar.gz file is displayed by this command.

Keep in mind to change directory/, file1.txt, file2.txt, and archive.tar.gz to the actual names of the files and directories you wish to generate, extract, or modify.

The tar function offers a variety of options for working with archives, choosing compression ratios, maintaining file permissions, and more. Use the man tar command in the terminal to view the tar command’s manual page and explore all of your choices.

12. When using Linux, the “unzip” tool is used to extract files from ZIP archives. It enables you to unzip a ZIP file and extract its contents into a chosen location.

The “unzip” command’s fundamental syntax is as follows:

unzip [options] zipfile.zip [-d destination_directory]

The ZIP archive you want to extract is called “zipfile.zip” in this case. “-d destination_directory” is an optional flag that defines the directory where you want the files to be extracted. The “options” are additional flags you can use to change the behavior of the command. The files will be extracted into the currently active working directory if the destination directory is not specified.

Following are a few often-used options for the “unzip” command:

( 1 ) List the ZIP archive’s contents without extracting them with the -l option.

( 2 ) -o: Replace existing files automatically without asking.

( 3 ) Quiet mode, or -q. Suppress the extraction’s output.

( 4 ) -d: Indicate the location of the files that will be extracted.

Example of use

1 Get every file out of a ZIP archive:

unzip myfile.zip

2 A ZIP archive’s contents should be extracted into a specific directory:

unzip myfile.zip -d /path/to/destination/

3 Give a list of a ZIP archive’s contents:

unzip -l myfile.zip

These are but a handful of instances of how to employ the “unzip” command. Using the “man unzip” command, you can see the command’s documentation page to learn more about your options.

13. alias  A custom shortcut or shorthand for a lengthier or more complex command can be created in Linux using an alias. You can create your own command names or change the names of already existing commands to make them simpler to recall or type. In essence, an alias is a mapping between a unique name and the command or group of instructions it stands for.

Use the “alias” command, followed by the desired alias name and the command or commands it should represent, to define an alias. Here is the fundamental syntax:

alias alias_name='command'

Here, “alias_name” is the name you wish to give the alias, and “command” is the command itself or a group of commands you want to link to the alias. The command(s) may contain any legal shell syntax, including arguments, pipes, and options.

For instance, suppose you wish to make a shorter alias for the “ls -l” command, which displays a full list of files. An alias can be defined as follows:

alias ll='ls -l'

Now, the “ls -l” command will be run anytime you type “ll” in the terminal and press Enter. This can help you save time and use the command line more effectively.

In order to maintain them between sessions, aliases are often defined in the shell’s configuration files, such as “/.bashrc” or “/.bash_profile”. As soon as an alias is created, you can use it in the current terminal session. Make sure to include the alias definition in the relevant configuration file, though, if you want the alias to be accessible in each new terminal session.

You can use the “alias” command without any arguments to obtain a list of the aliases that are currently defined:


A list of aliases and their definitions will then be shown.

It’s crucial to remember that aliases are unique to the shell you’re currently using. You might need to modify your aliases in the configuration file of the new shell if you transition from one shell to another (for example, from Bash to Zsh).

14 cat: The “cat” command, which stands for “concatenate,” is used largely in Linux to display a file’s contents or to concatenate multiple files and display their contents simultaneously. It is a straightforward command that can be used in a variety of situations.

The “cat” command’s fundamental syntax is as follows:

cat [options] [filename]

The name of the file you want to show or concatenate is referred to as the “filename” in this case. To concatenate and show multiple filenames with their contents combined, separate the filenames by spaces. Without a filename, “cat” will read data from standard input, which is often the keyboard.

The cat command is frequently used for things like:

1 presenting a file’s content:

cat filename

2 combining many files together and showing their contents:

cat file1 file2

3 Use input from the terminal to create a new file or replace an existing one:

cat > filename

By doing so, you can type the contents of the file, and hit Ctrl + D ends the input.

4 Adding terminal input to a file that already exists:

cat >> filename

By doing this, you can add content to an existing file.

These are but a handful of applications for the cat command. It can be used with other commands to carry out more complicated actions and supports a number of options. If you’d like more information on the usage and options of the cat command, you may look them up in the manual by typing man cat in the terminal.

15. tail In Linux, the tail command is a command-line tool that is used to show the last few lines of a file or to continually check a file for newly added lines. When looking through recent additions to a file, such as log files, it is especially helpful.

The tail command is generally used as follows:

tail [options] [file(s)]

In this case, [file(s)] stands for the name(s) of the file(s) you want to display, and [options] refers to the numerous command arguments that change the behavior of the tail command.

The tail command is frequently used for things like:

1 displaying a file’s latest 10 lines (the default setting):

tail filename

2 displaying a set amount of lines from a file’s end:

tail -n <number-of-lines> filename

The last 20 lines of the file will be shown, for instance, when the tail -n 20 filename is used.

3 checking a file for new lines continuously (like the tail -f command):

tail -f filename

This will run the command continually, updating the output when new lines are added to the file, and display the most recent 10 lines of the file. Real-time log file monitoring is frequently done using it.

These are only a few uses of the tail command. It offers a lot of options, including the ability to display lines in reverse order, a specific number of bytes, and more. If you want full information on the usage and options of the tail command, type man tail in the terminal.

16. grep Linux has a robust command-line tool called grep that can be used to look for particular regular expressions or patterns in files or the output of other programs. The acronym GRE Print means “global regular expression print.”

The grep command is generally used as follows:

grep [options] pattern [file(s)]

Here, pattern denotes the text or regular expression you want to search for, [options] denotes the numerous command options that change the behavior of the grep command, and [file(s)] denotes the name(s) of the file(s) you wish to search within. Grep will search the standard input (such as the output of another command) if no files are given.

The grep command is frequently used for things like:

1 Finding a certain pattern in a file:

grep "pattern" filename

The given file will be searched for the specified pattern, and all matching lines will be displayed.

2 Finding a trend across several files:

grep "pattern" file1 file2

In both file 1 and file 2, the pattern will be looked for, and the matching lines and accompanying file names will be displayed.

3 Recursively searching directories

grep -r "pattern" directory

All files in the specified directory and its subdirectories will be searched for the pattern.

4 Without regard to the case:

grep -i "pattern" filename

A case-insensitive search will be conducted using this, disregarding the difference between capital and lowercase letters.

5 Regular expressions usage

grep -E "regex-pattern" filename

By enabling extended regular expressions, more intricate pattern matching is made possible.

These are only a few applications of the grep command. To execute more complex searches and manipulations, it provides a number of arguments and can be used in conjunction with other commands. By running man grep in the terminal, you may see the grep command’s manual page for further information on its usage and its options.

17 echo: Linux comes with a command-line tool called echo that can be used to show a line of text or the value of a variable on the terminal. It can be used interactively at the terminal, although it is typically used for printing messages or showing data within shell scripts.

The echo command can be used in the following ways.

echo [options] [text or variables]

In this case, [options] refers to the numerous command parameters that change how the echo command behaves, and [text or variables] stands for the text or variables whose values you want to display.

The echo command is frequently used for things like:

1 showing one line of text

echo "Hello, world!"

This causes the terminal to print the text that is supplied.

2 Putting a variable’s value on display:

my_var="Hello, world!"
echo $my_var</pre>

This will display “Hello, world!” as the value of the variable my_var.

3 Multiple lines of text displayed:

echo "Line 1"
echo "Line 2"

By doing this, the terminal will print each line of text separately.

4 removing the final newline after a line break:

echo -n "Hello"

The newline character is not displayed at the conclusion when the -n option is used, allowing you to continue on the same line.

These are only a few applications of the echo command. It provides a number of options, like enabling backslash escape interpretation, managing output formatting, and more. If you want full information on the usage and options of the echo command, type man echo into the terminal.

18 .chown  Change the ownership of files and directories in RHEL (Red Hat Enterprise Linux) by using the chown command. “Chown” is an acronym for “change owner.” It enables you to change a file or directory’s user and group ownership.

The chown command has the following basic syntax:


The following are the command’s essential elements:

( 1 ) The new owner of the file or directory is specified by USER. A username or a numerical user ID are both acceptable.

( 2 ) Names the new group that will be the owner of the file or directory in GROUP (optional). It might be a group name or a group ID, just like the user.

( 3 ) FILE: Indicates which file or directory the ownership change will affect. Multiple files or folders can be specified, with spaces separating them.

The following are some frequently used chown command options:

( 1 ) Changes ownership recursively, affecting all files and directories inside the specified directory, using the option -R or –recursive.

( 2 ) -v or –verbose: Shows descriptive output that details the modifications the command made.

( 3 ) Similar to the -v option, the -c or –changes option only shows the output for files whose ownership has changed.

Several uses for the chown command are shown below:

1 Changing a file’s owner:

chown john myfile.txt

2 Recursively modify a directory’s owner and group:

chown -R john:users mydir/

3 Multiple files can have their owners and groups changed:

chown user1:group1 file1.txt file2.txt

Keep in mind that administrative privileges are often needed to use the chown command.

19. chmod:  The permissions (access rights) of files and directories can be changed in RHEL (Red Hat Enterprise Linux) by using the chmod command. “Chmod” is an acronym meaning “change mode.” You may manage who has access to a file or directory and who can read, write, and execute code.

The chmod command’s basic syntax is as follows:


( 1 ) The permissions to be set are specified by MODE. It might be formulated numerically or symbolically

( 2 ) The file or directory whose permissions are being altered is specified by the FILE keyword. Multiple files or folders can be specified, separated by spaces.

There are two ways to display the permissions:

1. Symbolic Mode: In the symbolic mode, permissions are represented by letters that both identify the type of permission and the user or group they apply to. The used letters are

( 1 ) g: Group
( 2 ) u: User (owner)
( 3 ) a: All (equivalent to u+g+o)
( 4 ) o: Other (everyone else)

( 1 )  The following letters stand in for the different types of permissions:

(1 ) r: Read
( 2 ) w: Write
( 3 ) x: Execute

( 2 ) The following symbols can be used in symbolic mode to give or revoke permissions:

( 1 ) +: Adds the specified permission
( 2 ) -: Removes the specified permission
( 3 ) =: Sets the specified permission and removes all others

code is written in bash

chmod ug=rw,o=r myfile

2. Numeric Mode: The numeric mode uses a three-digit octal number to denote the permissions. The permissions for the owner, group, and others are each represented by a different numeral. By adding the values for the desired permissions, the digits can be calculated:

( 1 ) Read (r): 4
( 2 ) Write (w): 2
( 3 ) Execute (x): 1

For instance, you may use the following to grant the owner read and write access while granting others only read permission:

code is written in bash

chmod 644 myfile.txt

The following are some frequently used chmod command options:

( 1 ) R or –recursive: Recursively modifies permissions for all files and folders inside the specified directory

( 2 ) -v or –verbose: the command’s modifications are displayed in detail in the output.

( 3 ) -c or –changes: Similar to the -v option, but only shows the output for files with modified permissions.

It’s important to keep in mind that the chmod command often needs administrative rights.

20 umask: For freshly created files and directories in RHEL (Red Hat Enterprise Linux), the umask command is used to specify the default file permissions. The word “umask” is an acronym for “user file creation mask.” It is a four-digit octal number that represents the rights that should be removed from newly created files’ default permissions.

The umask command often has the following syntax:

umask [options] [mask]

Here, [mask] provides the file permission mask you want to configure, and [options] depicts several command arguments that can be used with the umask command. The current umask value is shown if the [mask] option is left out.
An octal four-digit number serves as the representative for the file permission mask. The authorization bits for the owner, group, and others are assigned to each digit, correspondingly. Each digit can have a value between 0 and 7, with 0 denoting full permission (read, write, and execute) and 7 denoting no authorization.

The significance of each digit is broken down below:

( 1 ) The file owner’s (user’s) permissions are represented by the first digit.

( 2 ) The file’s group owner’s permissions are represented by the second digit.

( 3 ) Users who are neither the owner nor a member of the group have their permissions represented by the third digit.

Subtract the chosen digit from 7 to determine the total permit. The default permissions for newly generated files are 644 (666 – 022) and for directories are 755 (777 – 022), for instance, if the umask value is 022.

Note: The default permissions for new files and directories are the only ones that the umask command changes. Existing files and folders’ permissions are not changed by it.

For further information and thorough usage examples unique to your version of RHEL, consult the umask man page (man umask).


24 May 2023

How to managing Process Management OS

What is the Process of Management

A process is an action that takes place when a program is run. Any procedure needs computer resources to be performed.

The operating system must effectively manage all of these processes and resources since the computer system can run multiple processes at once, each of which uses the same resource.

In order to preserve consistency in the system, some resources must be used by a process all at once. If this does not occur, the system may experience deadlock and inconsistent behavior

Through actions like resource allocation and process scheduling, the operating system is able to carry out these processes. The CPU (Central Processing Unit) is utilized by a process when it runs on a computer device’s memory. The operating system is responsible for coordinating the computer’s many processes…

A process has a collection of executable instructions that we refer to as process code. The resources needed for the execution of this data are referred to as Process Components since certain data is also related to the process that is being used.

Process management execution

In process management, the following duties are carried out:-

( 1 ) Scheduling CPU threads and processes.:-
( 2 ) It functions to add and remove user- and system-level processes.
( 3 ) The system’s running processes are paused and then resumed.
( 4 ) It offers a system for synchronizing processes.
( 5 ) Additionally, this method offers a communication mechanism.

When a program is loaded into memory, it becomes a process and may be broken down into the following four components:-


Process:- A process is a running instance of a launched, executable program.
A process consists of:-
➢ An address space of allocated memory.
➢ Security properties including ownership credentials and privileges.
➢ One or more execution threads of program code.
➢ Process state

The environment process includes:-

➢ Local and Global variables.
➢ A current scheduling context.
➢ Allocated system resources, such as file descriptors and network ports.

How to Find the Process State

Using the top command is the simplest technique to determine the condition of the process. This command displays the top processes that are currently active along with a few columns by default. In the “S” column, the state is typically represented by one character. Additionally, the ps command is available. Based on the criteria you pass it using flags, this will show processes. Depending on the data you wish to view, it accepts a few different flags. “ps aux” is the typical one.
Although you should always consult the man pages for your distribution and specific commands, the following are the most typical mappings of character to state.

Linux process States:-


( 1 ) R (running):- TASK_RUNNING
( 2 ) S (sleeping):- TASK_INTERRUPTIBLE
( 3 ) D (sleeping):- TASK_UNINTERRUPTIBLE
( 4 ) K (sleeping):- TASK_KILLABLE
( 5 ) I (sleeping):- TASK_REPORT_IDLE
( 6 ) T (stopped):- TASK_STOPPED
( 7 ) T (stopped):- TASK_TRACED
( 8 ) Z (zombie):- EXIT_ZOMBIE
( 9 ) X (zombie):- EXIT_DEAD

( 1 ) R (running):- TASK_RUNNING
TASK_RUNNING: The process is either executing on a CPU or waiting to run.
The process can be executing user routines or kernel routines (system calls), or
be queued and ready when in the Running (or Runnable) state

( 2 ) S (sleeping):- TASK_INTERRUPTIBLE
TASK_RUNNING: The process is either executing on a CPU or waiting to run.
The process can be executing user routines or kernel routines (system calls), or
be queued and ready when in the Running (or Runnable) state

A well-coded program enters the INTERRUPTABLE_SLEEP state as it waits for this. A process can be quickly and trouble-free terminated in this state. When a process enters this state while awaiting input, it might step aside and allow other processes to receive CPU time. Circulating through CPU time would be a waste of resources.

( 3 ) D (sleeping):- TASK_UNINTERRUPTIBLE
TASK_RUNNING: The process is either executing on a CPU or waiting to run.
The process can be executing user routines or kernel routines (system calls), or
be queued and ready when in the Running (or Runnable) state.

( 4 ) K (sleeping):- TASK_KILLABLE
TASK_RUNNING: The process is either executing on a CPU or waiting to run.
The process can be executing user routines or kernel routines (system calls), or
be queued and ready when in the Running (or Runnable) state

( 5 ) I (sleeping):- TASK_REPORT_IDLE
TASK_REPORT_IDLE: A subset of state D. The kernel does not count
these processes when calculating load average. Used for kernel threads.
Flags TASK_UNINTERRUPTABLE and TASK_NOLOAD are set. Similar to
TASK_KILLABLE, also a subset of state D. It accepts fatal signals.

( 6 ) T (stopped):TASK_STOPPED
TASK_REPORT_IDLE: A subset of state D. The kernel does not count
these processes when calculating load average. Used for kernel threads.
Flags TASK_UNINTERRUPTABLE and TASK_NOLOAD are set. Similar to
TASK_KILLABLE, also a subset of state D. It accepts fatal signals.

( 7 ) T (stopped):- TASK_TRACED
ASK_TRACED: A process that is being debugged is also temporarily
Stopped and shares the same T-state flag.

( 8 ) Z (zombie):- EXIT_ZOMBIE
EXIT_ZOMBIE: A child’s process signals to its parent as it exits. All resources
except for the process identity (PID) released.

( 9 ) X (zombie):- EXIT_DEAD
EXIT_DEAD: When the parent cleans up (reaps) the remaining child process
structure, the process is now released completely. This state will never be
observed in process-listing utilities.

Basic Command

1. /proc/cpuinfo:-  This file basically serves as a repository for the machine’s current resources.

[root@server ~]# vim /proc/cpuinfo

2. ps:- Typically, the ps command is used to display the OS on the machine’s active processes.

[root@server ~]# ps

3. ps aux:- Different display formats are used for processes

[root@server ~]# ps aux

4. ps lax:- Processes are displayed in different formats.

[root@server ~]# ps lax

5. ps -ef:- Processes are displayed in different formats.

[root@server ~]# ps ef

6. pstree:- Is employed to present a process as a tree.

[root@server ~]# pstree


7. pstree -p | grep firefox:- To find the Firefox processes in the process tree structure

[root@server ~]# pstree -p | grep firefox

Running Firefox 

8. Sleep:- In order to establish a fake job, use the sleep command. The execution can be delayed by using a dummy task. By default, it measures time in seconds, but you can change the format by including a tiny suffix (s, m, h, or d) at the end. This command pauses the process for the duration specified by NUMBER.


Note: The sleep command will delay the sum of the values if you declare more than one NUMBER with it.
the options offered by the sleep command

➢  Sleep –help:- It provides assistance information.

[root@server ~]# sleep --help
Usage: sleep NUMBER[SUFFIX]...
or: sleep OPTION
Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default),
'm' for minutes, 'h' for hours or 'd' for days. NUMBER need not be an
integer. Given two or more arguments, pause for the amount of time
specified by the sum of their values.

--help display this help and exit
--version output version information and exit

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Full documentation <https://www.gnu.org/software/coreutils/sleep>
or available locally via: info '(coreutils) sleep invocation

➢ -version:– Version information is shown.

[root@server ~]# sleep --version


9.top:- In Linux operating systems, the top command is a frequently used tool that offers real-time resource monitoring. It presents a live, interactive view of system processes and how much resource each one is using. The top is frequently used to examine system performance, spot resource-hungry programs, and keep tabs on a Linux system’s general health.
The top command in a terminal displays a table-like interface with numerous columns that include data on various system components when you run it. You might see a few of the important columns, such as:

( 1 ) PID (Process ID): A special identification number is given to each active process.
( 2 ) USER: The user account that the process is currently operating as.
( 3 ) PR (Priority): The process’s priority.
( 4 ) The “niceness” of the process, which affects its priority, is referred to as NI (Nice value).
( 5 ) Virt (Virtual Memory): The total amount of virtual memory a process is using.
( 6 ) The process’s non-swapped physical memory is known as RES (Resident Memory).
( 7 ) SHR (Shared Memory): The process’s shared memory.
( 8 ) CPU%: The process’s share of total CPU utilization.
( 9 ) MEM%: The process’s percentage of memory (RAM) consumption.
( 10 ) TIME+: The total amount of CPU time that the process has used.

In addition to these columns, the top of the display includes data on system-wide CPU consumption, memory usage, uptime, and other pertinent metrics.
By pressing different keys, you can interact with the top in real time and do numerous tasks. For instance, hitting ‘k’ will allow you to signal processes, ‘f’ will let you select which columns to display, and ‘q’ will stop the top command.
Remember that the top needs root or superuser access to display details about all running processes.

Press->h (Help):- Pressing the h key displays all top command-related choices

Renice the processes:- Using the top command


10. kill:- When a process is running on the system, the “kill” command in Linux can be used to signal its termination or take other actions. Although its main usage is to terminate processes, it can also be used to deliver additional signals to processes for a variety of purposes.
The “kill” command’s basic syntax is as follows:

kill [options] <PID>

The process ID of the process you want to target is shown below as PID>. The “ps” command or other process monitoring tools can be used to locate the process ID.
By default, the termination signal (SIGTERM) is sent to the specified process when you execute the “kill” command without providing a signal. This enables the process to carry out any necessary cleanup procedures prior to ceasing.
With the “-” option, you can, however, optionally specify different signals. For instance, the “-9” option is frequently used to SIGKILL (forcefully terminate) a process. The SIGKILL signal kills the process immediately and cannot be caught or disregarded by the process.

[root@server ~]# top

An illustration of how to end a process with process ID 909 is as follows:

[root@server ~]# kill 909

Renice the processes:- Using the top command

Set signal on processes:- Using the top command




Practical Implementations of DevOps: Case Studies Explored in Online Courses
18 May 2023

Practical Implementations of DevOps: Case Studies Explored in Online Courses

The term “DevOps” was created by combining the acronyms for the words “development” and “operations,” however, it refers to neither code nor a programming language, as many individuals believe. Within a single IT group or company, it is an idea or mindset that facilitates the collaboration between the development group and the operation team.

  • DevOps Implementation in an online trading company

There are instances when the two groups are combined into one. The financial trade firm’s testing, creation, and development approach was automated. You can learn more case studies when enrolling in DevOps Online Course in Ahmedabad. However, the deployment was completed in 45 seconds, leveraging DevOps. The length of the entire procedure was shortened, and customers’ levels of engagement improved.

  • Advance your skills with Ansible and DevOps

DevOps is made simpler using Ansible by automating the integration of internally created apps into production processes. Ansible is a highly well-liked DevOps tool for overseeing, automating, orchestrating, and customizing IT infrastructure. With the help of the Ansible Training and Certification Course in Ahmedabad, you will get greater insight into Ansible being an advanced tool for automation, management of systems, and DevOps. Still, it offers practical applications for regular users. Without the need for programming knowledge, Ansible enables you to set up a single machine and possibly a whole system of machines simultaneously.

  • Meet industry demands with Linux systems

Enrolling in Linux Certification in Ahmedabad can help you address the demands or needs of your company. You might want to certify your knowledge or expertise with Linux. In any case, performance-driven tests, practical tests, or a mix of these can be used to decide professional certificates. These techniques are intended to assess your aptitude for the duties expected of Linux administrators.

There are several ways to be prepared for a certification test. Still, training courses are well-liked since they might demonstrate to you real Linux-based corporate systems and the usual problems and activities you must learn. Several businesses provide Linux Administration Online Training in Ahmedabad that enables you to study while carrying out activities in an online Linux atmosphere to learn real-world applicability in an educational setting.

Highsky IT Solutions offers the most effective courses to help you gain the knowledge to succeed as a DevOps engineer. They also demonstrate the business’s development team’s perspective, ability to collaborate, operation of product development, and a few tools businesses employ to safeguard the effectiveness of their web applications.

12 May 2023

Linux File System

An organized group of files on a disc drive or partition is known as a Linux file system. A partition is a section of memory that holds a particular set of data. Different memory partitions are possible in our machine. A file system is typically present on every partition.
So that we can quickly access the files, the general-purpose computer system must store data in a methodical manner. The data is kept on hard discs (HDD) or an analogous sort of storage. Below are some possible justifications for retaining the file system:

o The computer saves data mostly to its RAM storage; if it is shut off, the data may be lost. Non-volatile RAM, such as Flash RAM and SSD, is available, nevertheless, so the data can still be kept after the power is cut.
o Hard drives are favored for data storage over conventional RAM since disc space is less expensive. Compared to RAM, the cost of hard discs is gradually declining.

The following divisions make up the Linux file system:

A root directory (/)

A particular data storage format (such as EXT3, EXT4, BTRFS, XFS, etc.)

A logical volume or partition with a certain file system.

The Linux File System: What is it?

A Linux operating system’s built-in layer known as the file system is typically utilized to manage the storage’s data. Arranging the file on the disc storage is helpful. It controls a file’s name, size, creation date, and a great deal more information.

If our file system contains a file format that is not supported, we can download software to handle it.

Arrangement of the Linux File System

Due to the existence of a root directory and its subdirectories, the Linux file system features a hierarchical file structure. From the root directory, you can access all other directories. Though it is uncommon, a partition could have more than one file system.

A file system is made to be able to control and accommodate non-volatile storage data. A namespace, which is a naming and organizational mechanism, was necessary for all file systems. A subset of characters that can be used for the file name or the length of the file name are both defined by the namespace. Additionally, it describes the logical organization of files on a memory segment, such as the use of folders to group particular files together. A Metadata description for that specific file must be defined after a namespace has been described.

The hierarchical directory structure, which is used to describe the free and occupied disc space for a certain block, must be supported by the data structure. Additionally, it contains information about the files’ size, latest modification date, and creation date and time.

Additionally, it keeps detailed information on the disc region, including volumes and partitions.

The information about the file system saved on the drive is contained in the advanced data and the structures that it represents; it is separate and unrelated from the file system metadata.

A two-part file system software implementation architecture is present in the Linux file system. Think about the photo below:

To interact with the file system’s elements, such as files and directories, you need to access the function calls through an API (application programming interface). The use of API makes operations like copying, deleting, and creating files easier. It makes it easier for an algorithm to specify how files should be organized on a file system.

A Linux virtual file system is what is referred to as the first two components of the supplied file system. The file system can be accessed by the kernel and programmers using a single set of commands. To provide an interface to the file system, this virtual file system needs a certain system driver.

Directory Organisation

We can store the files in the directories and find them when we need them. Additionally, directories are referred to as folders because, using the analogy of a physical desktop, one can conclude that they are folders where files are stored. Linux and a few other operating systems allow for the hierarchy of directories to be organized in a tree-like fashion.

The Linux FHS (Filesystem Hierarchy Standard) contains detailed documentation and definitions of the directory structure. Using the sequentially deeper names of the directory linked by the forward slash ‘/’, such as /var/spool/mail and /var/log, to access those directories. These are referred to as pathways.

The following table provides a very brief summary of standard, well-known, and defined top-level Linux directories and their functions:

/ (root filesystem): It is the root directory of the filesystem. Before mounting another filesystem, it must include all of the files required to boot the Linux operating system. Each other
The root filesystem directories are used to mount the filesystem on a predetermined and common mount point once the system has booted.

/home: User files can be stored in the home directory. Within /home, a subdirectory exists for each user.

/root: It serves as the root user’s home directory. Not the ‘/’ (root) file system, keep that in mind.

/etc: It contains the host system’s local system configuration files.

/boot: It contains the static bootloader configuration, executable files, and kernel configuration required to boot a Linux computer.

/dev: It contains the device file for each piece of hardware attached to the system. Instead of being device drivers, these are files that list every device on the system and grant access to it.

/bin: There are executable files for users in this directory.

/sbin: System binary files are these. They are system administration-related executables.

/lib: Shared library files that are required to launch the system are included.

/media: a location to mount external removable media devices, such as USB thumb drives, which might be connected to the host.

/mnt: When an administrator is working on or fixing a filesystem, they can use it as a temporary mount point for simple filesystems.

/opt: It contains extra files, such as vendor-supplied programs for applications, which must be inserted here.

/var: Files with variable data are kept here. MySQL, log files, other database files, email inboxes, web server data files, and many other things may be there.

/usr: Including executable libraries and binaries, man files, and various documentation kinds, they are read-only and shareable files.

/tmp: The OS and various programs store temporary files in this directory, which is transient. Users may also utilize this location to temporarily store files. Keep in mind that files in this directory may be deleted at any time and without prior notice.

File System Features in Linux

The file system in Linux builds a tree structure. All of the files are set up in the shape of a tree with branches. The root (/) directory is the one at the top. The root directory in Linux provides access to every other directory.
Here are a few essential characteristics of the Linux file system:

Specifying paths: When specifying paths, Linux utilizes the forward slash (/) rather than the backslash () to divide the components. For instance, the data might be kept in C: My Documents Work on Windows, whereas it would be stored in /home/ My Document/ Work in Linux.

Partition, Directories, and Drives: In contrast to Windows, Linux does not organize drives using drive letters. When using Linux, it is impossible to distinguish between a partition, a network device, and a “ordinary” directory and drive.

Case Sensitivity: Linux has a case-sensitive file system. It makes a distinction between file names in lowercase and uppercase. For instance, in Linux, test.txt and Test.txt differ from one another. Also subject to this regulation are Linux commands and folders.

File Extensions: There is no requirement for a file to have a file extension on Linux, yet it is possible for a file to end in “.txt.” It can be challenging for new users learning Shell to distinguish between files and directories. When using a graphical file manager, the files and folders are represented by icons.

Hidden files: Linux has a distinction between regular files and hidden files; in the Linux operating system, configuration files are often hidden. Most of the time, we don’t need to read or access the hidden files. In Linux, hidden files are indicated by a dot (.) before the file name (for example,.ignore). We need to run a special command in the shell or alter the file manager’s view in order to access the files.

Linux file system types

Linux offers a variety of file systems when it is installed, including Ext, Ext2, Ext3, Ext4, JFS, ReiserFS, XFS, btrfs, and swap.

Let’s examine each of these file systems in more depth:

1. File systems for Ext, Ext2, Ext3, and Ext4

The file system is known by the term Extended File System. It was primarily made for the MINIX OS. Ext is an old file system that is no longer used due to a number of limitations.

Ext2 enables managing two terabytes of data and is the first Linux file system to do so. Ext3, an improved version of Ext2 with backward compatibility, is created through Ext2. Ext3’s primary flaw is that servers cannot use it because file recovery and disc snapshots are not supported by this file system.

Ext4 Among all the Ext file systems, the file system is the fastest. It is the default file system in the Linux distribution and is a particularly compatible alternative for SSD (solid-state drive) discs.

2. File System JFS
Journaled File System, or JFS for short, is a program created by IBM for AIX Unix. A replacement for the Ext file system is this one. In situations when stability is required with limited resources, it can also be used in place of Ext4. When CPU power is constrained, this file system comes in handy.

3.File System ReiserFS

The Ext3 file system has competition in the form of ReiserFS. It performs better and has more sophisticated features. SUSE Linux previously utilized ReiserFS as its default file system, but subsequently, it altered several restrictions and SUSE switched back to Ext3. Although this file system dynamically supports the file extension, there are certain performance issues.

4. File system XFS.

The XFS file system, which was created for parallel I/O processing, was seen as a high-speed version of JFS. Despite having a huge storage server (300+ Terabyte server), NASA continues to use this file system.

5. File System Btrfs

The B tree file system is referred to as Btrfs. It is utilized for fault tolerance, extensive storage configuration, fun administration, and more. It does not fit the production system well.

6. File System Swap 

During system hibernation, the Linux operating system pages memory using the swap file system. A system that never enters the hibernation state must have swap space that is equivalent to the size of its RAM.

In the Linux Filesystem, what does mounting mean?

The term “to mount” in the Linux filesystem refers to the early days of computing when a detachable disc or tape pack would physically need to be mounted on the appropriate drive device. After being physically located on the drive, the filesystem on the disc pack would be logically mounted by the OS to make contents accessible to application programs, the OS, and users.
A mount point is just a directory created as a part of the filesystem. For instance, the /home directory houses the home filesystem. On many non-root filesystems, filesystems can be mounted on mount points, but this is less usual.

  • Very early in the startup process, the Linux root filesystem is mounted on the / directory (root directory).
  • Several filesystems are later mounted by the Linux start-up programs, either via systems in newer Linux versions or rc on SystemV.
  • During startup, the configuration file, /etc/fstab.ns, manages filesystem mounting.
  • The term “file system table,” which is short for “file system list,” makes it simple to comprehend. It is a list of filesystems that need to be mounted, along with information about their choices and possible mount points.

The mount command can be used to mount filesystems on a directory or mount point that is currently open. In other words, every directory that is used as a mount point should be empty and without any other files. Linux won’t stop users from mounting a filesystem on an already-existing one or on a directory that already has files on it. If we mount any filesystem on any existing filesystem or directory, the actual contents will be hidden and just the recently mounted filesystem content would be shown.

11 May 2023

How to install MariaDB and use MariaDB redhat

History of MariaDB Foundation

The foundation that will direct MariaDB’s development was announced in December 2012 by Michael Widenius, David Axmark, and Allan Larsson.

The Foundation wanted to develop a governance structure that was akin to the Eclipse Foundation’s when it was founded in 2013. Mike Milinkovich, executive director of the Eclipse Foundation, was chosen by the board to serve as an advisor throughout the changeover.

After initial agreements on the allocation of ownership and functions between the MariaDB Foundation and MariaDB Corporation, MariaDB Corporation Ab became the first sponsor member of the MariaDB Foundation in 2014. For instance, MariaDB is a registered trademark of MariaDB Corporation Ab and is used by MariaDB under license.

Foundation. Originally established in 2010 as SkySQL Corporation Ab, MariaDB Corporation Ab changed its name in 2014 to better reflect its position as the primary force behind the development of the MariaDB server and the largest support provider for it. Simon Phipps, the CEO of the Foundation at the time, resigned in 2014 when SkySQL purchased the MariaDB trademark. Later, he claimed: “I left as soon as it became clear that the company would not permit an independent foundation.”

The Foundation’s CEO from April 2013 to 2014 was Simon Phipps. The CEO from January 2015 to September 2018 was Otto Kekäläinen. Arjen Lentz served as the Foundation’s CEO from October 2018 until his resignation in December of that same year. On February 1st, 2019, Kaj Arnö began serving as CEO. The board’s current chairman is Eric Herman.

This guide will demonstrate how to install MariaDB on RHEL 8. 9.  version

A fork of MySQL, MariaDB is a free and open-source Relational Database Management System (RDBMS). It is a well-known database server in the developer community and is in heavy use. MariaDB has established itself as one of the top SQL databases in the market, with users ranging from novices to intermediate and advanced database administrators.

This tutorial will show you how to set up MariaDB on RHEL 9. The community version, which is available for free download and usage, will be installed.

Install MariaDB 

Step 1: AppStream’s official repositories offer MariaDB Server. This may be verified by performing the following repository search for the package:

[root@server ~]# yum install mariadb-serverc

Step 2: check the version of MariaDB

[root@server ~]# mariadb --version

Step 3:  Start the MariyaDB service

[root@server ~]# systemctl start mariadb.service

Step 4:  of this command  ” enable”  automatically boot time. start  MariyaDB service

[root@server ~]# systemctl enable mariadb.service

Step 5: Check service running

[root@server ~]# systemctl status mariadb.service

MariaDB Secure installation on RHEL 9

Step 1: MariaDB, just like MySQL is the default. secure Therefore, you must take another step and run the mysql_secure_installation script.

You are guided through a series of prompts by the Running command. You will need to create a root password first. The default root user unix socket authentication in MariaDB is insufficiently secure.

So, decline from using the Unix socket authentication by pressing  ” n ” and hitting

[root@server ~]# mysql_secure_installation

Enter current password for root (enter for none):  [Press Enter] 

Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.

Your root account is protected, so you can safely answer ‘n’.

Switch to unix_socket authentication [Y/n]   [Press ” n ” Enter ] 

Change the root password? [Y/n]    [ Press ” y ” Enter ]

New password:                                   [ highsky@123 ]

Re-enter new password: Re-enter password  [ highsky@123 ]

Password updated successfully!
Reloading privilege tables.
… Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n]        [ Press ” y ” Enter ] 
.. Success!

Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]   [ Press ” y ” Enter ]
… Success!

By default, MariaDB comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]  [ Press ” y ” Enter ]
– Dropping test database…

… Success!
– Removing privileges on test database…
… Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]   [ press ” y ” Enter ] 
… Success!

Cleaning up…

All done! If you’ve completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Successful Secure installation

Create MariaDB Database 

Step 1: Log in now back to the MariaDB server and authenticate with the password you configured.

[root@server ~]# mysql -u root -p

Enter password:  Enter your root password

Step 2: Create a test database. Here, we are going to name it highsky_db

MariaDB [(none)]> CREATE DATABASE highsky_db;

Query OK, 1 row affected (0.001 sec) 

Step 3: Create a local host user name ” Harry ” used. password ” password “with your own strong password.

MariaDB [(none)]> CREATE USER Harry@localhost IDENTIFIED BY "password";

Query OK, 0 rows affected (0.009 sec)

Step 4: Grant privileges to the database user on the database.

MariaDB [(none)]> GRANT ALL ON highsky_db.* TO harry@localhost;

Query OK, 0 rows affected (0.003 sec)

Step 5: Flush privileges and exit the MariaDB console.


Query OK, 0 rows affected (0.001 sec)

Step 6: Exit

MariaDB [(none)]> exit

Step 7: to list the databases, run the command

MariaDB [(none)]> SHOW DATABASES;

Step 8:  list all the users created


MariaDB has been installed successfully.

08 May 2023

How to Allow Cross-account Bucket Permission

An AWS account—for example, Account A—can grant another AWS account, Account B, permission to access its resources such as buckets and objects. Account B can then delegate those permissions to users in its account. In this example scenario, a bucket owner grants cross-account permission to another account to perform a specific bucket operation

This article helps you navigate this minefield, with details not only of how the S3 permissions work but also of how you can implement some common real-world scenarios such as S3 bucket access from another AWS account.

  • Account A administrator user attaches a bucket policy granting cross-account permissions to Account B to perform specific bucket operations. Note that the administrator user in Account B will automatically inherit the permissions.
  • Account B administrator user attaches user policy to the user delegating the permissions it received from Account A
  • The user in Account B then verifies permissions by accessing an object in the bucket owned by Account A.

First, we need to create an s3 Bucket steps are given below:

Step 1: Log on to your AWS Console

Step 2: go to the Search bar  ” S3 services

Step 3: Click on S3  Scalable Storage in the Cloud” and proceed further

Step 4: Create a new Bucket

In the general configuration category:

Step 5: Enter the bucket name  (cross-account bucket ) 

Step 6: Next, choose the  AWS region,  [Asia Pacific (Mumbai) ap-south-1].

ACLs disabled (Recommended)

Bucket owner enforced – Bucket and object ACLs are disabled, and you, as the bucket owner, automatically own and have full control over every object in the bucket. Access control for your bucket and the objects in it is based on policies such as AWS Identity and Access Management (IAM) user policies and S3 bucket policies Objects can be uploaded to your bucket only if they don t specify an ACL or if they use the bucket-owner-full-control canned ACL.

Block Public Access settings for this bucket

Public access is granted to buckets and objects through access control lists (ACLs), bucket policies, access point policies, or all. In order to ensure that public access to this bucket and its objects is blocked, turn on Block all public access. These settings apply only to this bucket and its access points. AWS recommends that you turn on Block all public access, but before applying any of these settings, ensure that your applications will work correctly without public access. If you require some level of public access to this bucket or objects within, you can customize the individual settings below to suit your specific storage use cases

Bucket Versioning

Versioning is a means of keeping multiple variants of an object in the same bucket. You can use versioning to preserve, retrieve, and restore every version of every object stored in your Amazon S3 bucket. With versioning, you can easily recover from both unintended user actions and application failures.


( choose the Disable )

Default encryption

The default encryption configuration of an S3 bucket is always enabled and is at a minimum set to server-side encryption with Amazon S3-managed keys (SSE-S3). With server-side encryption, Amazon S3 encrypts an object before saving it to disk and decrypts it when you download the object. Encryption doesn’t change the way that you access data as an authorized user. It only further protects your data. You can configure default encryption for a bucket. You can use either server-side encryption with Amazon S3 managed keys (SSE-S3) (the default) or server-side encryption with AWS Key Management Service (AWS KMS) keys (SSE-KMS).

Amazon S3 managed keys (SSE-S3)

( Choose the  Amazon S3 managed keys (SSE-S3) )

Bucket Key = Enabel

Step 7: Click on Create Bucket.

If the bucket is created successfully, you will see a message like this on the top of the page:

 Step 8: click bucket name

Step 9: Go to the Permissions tab.

Step 10: Bucket policy
The bucket policy, written in JSON, provides access to the objects stored in the bucket. Bucket policies don’t apply to objects owned by other accounts
and click Edit

 Policy generator

Step 1:  Select Policy Type

A Policy is a container for permissions. The different types of policies you can create are an IAM Policy, an S3 Bucket Policy, an SNS Topic Policy, a VPC Endpoint Policy, and an SQS Queue Policy.

S3 bucket policy

 Add Statement(s)

Step 2: Add Statement(s)

A statement is the formal description of a single permission. See a description of elements that you can use in statements.

 Allow  Deny

Step 3: Principal = arn:aws:iam::ACCOUNT-B-ID:root

Step 4: Actions = GetObject , ListBucket , PutObject

Step 5:


Step 6: Click [ Add statement ]

Create the same again as above but put /* on bucket ARN

Step 1:  Select Policy Type

A Policy is a container for permissions. The different types of policies you can create are an IAM Policy, an S3 Bucket Policy, an SNS Topic Policy, a VPC Endpoint Policy, and an SQS Queue Policy.

S3 bucket policy

 Add Statement(s)

Step 2: Add Statement(s)

A statement is the formal description of a single permission. See a description of elements that you can use in statements.

 Allow  Deny

Step 3: Principal = arn:aws:iam::ACCOUNT-B-ID:root

Step 4: Actions = GetObject , ListBucket , PutObject

Step 5:


Step 6: Generate Policy

Copy policy

Go to Policy generator

past policy

   "Version": "2012-10-17",
   "Id": "Policy1683696444814",
   "Statement": [
        "Sid": "Stmt1683696418840",
        "Effect": "Allow",
        "Principal": {
          "AWS": "arn:aws:iam::Account-B-id :root"
        "Action": "s3:*",
        "Resource": "arn:aws:s3:::cruse-account-s3-buckee"
       "Sid": "Stmt1683696442588",
       "Effect": "Allow",
       "Principal": {
         "AWS": "arn:aws:iam::Account-B-id:root"
       "Action": "s3:*",
       "Resource": "arn:aws:s3:::cruse-account-s3-buckee/*"

After that, we have to log in to Aws Account ( B ).

Step 1: Now open a new tab and open AWS Policy Generator

4: Click [ Add statement ]

Copy policy,

  "Version": "2012-10-17",
  "Statement": [
      "Sid": "Stmt1683701367955",
      "Action": [
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::cruse-account-s3-buckee"
      "Sid": "Stmt1683701399477",
      "Action": [
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::cruse-account-s3-buckee"

Step 2: Navigate to the IAM Dashboard by clicking on the “Services” dropdown menu, selecting “SecuritNy, Identity, & Compliance,” and then clicking on “IAM.”

Step 2: Click on “Policies” in the left-hand menu and then click on the “Create policy” button.

Step 3: After generating paste it into Identity and Access Management (IAM) | Click on
Policy | Click on Create Policy | Click on JSON | Click on Create Policy


Click next

Step 4: file policy name = cruse-account-policy

Click Create policy

Security credentials

Step 1: Access keys (1)Use access keys to send programmatic calls to AWS from the AWS CLI, AWS Tools for PowerShell, AWS SDKs, or direct AWS API calls. You can have a maximum of two access keys (active or inactive) at a time. Learn more

Step 2: Click create access key

Continue to create access key?

I understand creating a root access key is not a best practice, but I still want to create one

Next, click Create Access Key

Go to Windrose cmd 

Download AWS CLI


Install and update requirements

  • We support the AWS CLI on Microsoft-supported versions of 64-bit Windows.
  • Admin rights to install software

Install or update the AWS CLI

To update your current installation of AWS CLI on Windows, download a new installer each time you update to overwrite previous versions. AWS CLI is updated regularly. To see when the latest version was released, see the AWS CLI version 2 Changelog on GitHub.

Step 1: Download and run the AWS CLI MSI installer for Windows (64-bit):


Step 2 : Alternatively, you can run the msiexec command to run the MSI installer.

C:\> msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi

Step 3: For various parameters that can be used, see msiexec on the Microsoft Docs website. For example, you can use the /qn flag for a silent installation.

C:\> msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi /qn

Step 4: To confirm the installation, open the Start menu, search for cmd to open a command prompt window, and at the command prompt use the aws –version command.

C:\> aws --version
aws-cli/2.10.0 Python/3.11.2 Windows/10 exe/AMD64 prompt/off

If Windows is unable to find the program, you might need to close and reopen the command prompt window to refresh the path or follow the troubleshooting in Troubleshooting AWS CLI errors.

and then open CMD

Step 1: AWS Config

command  = aws configure

Step 2: Aws access key [None]

  Access key ID

Step 3: Aws secret access key [None]

Secret access key

Step 4: Default region name [None]:


Step 5: Default output format [None]:


Step 6To see what s in the S3 bucket 
command  aws s3 ls s3://cruse-account-s3-buckee

Step 7:  Download the s3 bucket files

 aws s3 cp "s3://cruse-account-s3-buckee/ aws bsnner.jpg" .
Building a Productive and Efficient Data Science Team with the DevOps Culture
05 May 2023

Building a Productive and Efficient Data Science Team with the DevOps Culture

The data science industry is expanding swiftly, and more organizations recognize the advantages of hiring people with data science skills. The past three-year timeframe saw a 75 percent spike in employment advertisements for data scientists. More people are taking steps to learn data science to differentiate themselves from other candidates and follow this potentially beneficial profession. Getting the appropriate training is essential if you’re interested in establishing a data science position.

  • Gain professional advantages by learning DevOps

Studying DevOps can be extremely helpful for everyone in the software development field, whether in the operations or design departments. You may participate in a DevOps Online Course in Ahmedabad, considering your expertise and skill phase to enjoy professional advantages like shorter manufacturing processes, higher delivery rates, better teamwork and interaction, and more robotics productivity and collaboration with skilled programmers.

  • Boost your data science skills with Docker courses

Data scientists may benefit from learning Docker by enrolling in the Docker Certification Course in Ahmedabad. It enables them to quickly handle connections and situations, ensuring their software functions reliably on many platforms. Additionally, it frees them from having to depend entirely on the DevOps group. The portability of dockers enables quicker project software launch since several data scientists may easily help develop them.

  • Enhance your skills with Python Courses

Many people choose Python because of its accessibility, but data scientists find it even more enticing because of its wide range of excellent libraries. With the addition of libraries throughout time, Python has become more sophisticated and efficient. You can enroll in Python Courses in Ahmedabad and learn about selecting a library perfect for your Data Science requirements.

  • Enhance your career with data science training

Data science training makes your ability to meet the growing need for Big Data expertise and technologies easier. Professionals that have completed Data Science Training Ahmedabad are equipped with data management tools. An extra benefit for an applicant for an enhanced and successful career is if they are knowledgeable of and proficient in these important data abilities.

Enrolling in a data science training program will provide you with every detail you require to succeed in the industry, including the basics to advanced abilities. This is the initial step in obtaining certification as a data scientist. A well-known provider of computer technologies and services, Highsky IT Solutions also offers a range of IT certifications and training courses in cloud computing, open-source programming, networking, privacy and security, and data science.

04 May 2023

How To Install phpMyAdmin on RHEL 8 .9

Do you need all this service

httpd  web Serve ( Apache )

Install and Configure phpMyAdmin on RHEL 8.9

Install Apache Web Server make sure that you have a web server installed on your system. Apache is the most commonly used web server on Linux systems. You can install it using the following

Step 1: httpd service

[root@server ~]# yum install httpd -y

Step 2: Use of this command  ” enable ”  automatically boot time. start httpd service

[root@server ~]# systemctl enable httpd.service

Step 3: Stop the running httpd service and immediately start it again –

[root@server ~]# systemctl restart httpd.service

Step 4: Check service running

[root@server ~]# systemctl status httpd.service

Install PHP service


Step 1: phpMyAdmin is written in PHP and you’ll need it installed on your RHEL server. yum install


[root@server ~]#  yum install php -y
[root@server ~]# yum install php-zip php-json php-fpm -y

Step 2: Ensure the PHP-MySQL extension is installed.

[root@server ~]# yum install php-mysqlnd -y

Step3: Start and enable FPM service

[root@server ~]# systemctl enable --now php-fpm -y

Install MariaDB/MySQL Database Server

The next step is to install the MariaDB/MySQL database server. Follow the guides below to install MariaDB or MySQL on RHEL 8.

Installing MariaDB on RHEL 8 using the yum command

Step 1: Installing the MariaDB on RHEL 8, type:

[root@server ~]# yum install mariadb-server

Step 2: Securing the MariaDB server in  run

[root@server ~]# mysql_secure_installation

Step 3: Finally test your installation by running

[root@server ~]# mysql -u root -p

Step 4:  How to enable mariadb. service at  boot time

[root@server ~]# systemctl enable mariadb.service

Step 5:   Start/stop/restart mariadb. service on

[root@server ~]# systemctl start mariadb.service
[root@server ~]# systemctl restart mariadb.service
[root@server ~]# systemctl status mariadb.service

Install phpMyAdmin on RHEL 8.9

Step 1: Download the file to your local system

[root@server ~]# wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz

Step 2: Extract downloaded

[root@server ~]# tar xvf phpMyAdmin-latest-all-languages.tar.gz

Step 3: mv (Move) the folder

[root@server ~]# mv phpMyAdmin-*/ /usr/share/phpmyadmin

Step 4: Create the directory for phpMyAdmin temp files.

[root@server ~]# mkdir -p /var/lib/phpmyadmin/tmp
[root@server ~]# chown -R apache:apache /var/lib/phpmyadmin

Step 5: Create the directory for phpMyAdmin configuration files such as pass file.

[root@server ~]# mkdir /etc/phpmyadmin/

Step 6: Create a phpMyAdmin configuration file

[root@server ~]# cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php

Step7: Edit files

[root@server ~]#vim /usr/share/phpmyadmin/config.inc.php

Step 8: Needs to be 32 chars long

$cfg['blowfish_secret'] = 'H2OxcGXxflSd8JwrwVlh6KW6s2rER63i';

Step 9: Add Configure the Temp directory

$cfg['TempDir'] = '/var/lib/phpmyadmin/tmp';

Step 10: Create the phpMyAdmin Apache configuration file.

[root@server ~]# vim /etc/httpd/conf.d/phpmyadmin.conf
# Apache configuration for phpMyAdmin
Alias /phpMyAdmin /usr/share/phpmyadmin/
Alias /phpmyadmin /usr/share/phpmyadmin/

<Directory /usr/share/phpmyadmin/>
   AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>
     # Apache 2.4
     Require all granted
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from
     Allow from ::1

Then can restrict access from specific IPs by adding lines like the below  ( your IP )

Step 11: Validate httpd configuration

[root@server ~]# apachectl configtest

Syntax OK

Step 12: Then httpd service restart

[root@server ~]# systemctl restart httpd

 SELinux and Firewall Configure

Step 1: access the phpMyAdmin page. Allow httpd to serve content in the phpmyadmin directory.

[root@server ~]# semanage fcontext -a -t httpd_sys_content_t "/usr/share/phpmyadmin(/.*)?"

Step 2: This command Apply the policy by running

[root@server ~]# restorecon -Rv /usr/share/phpmyadmin

Step 3: Allow http service in the firewall.

[root@server ~]# firewall-cmd --permanent--add-service=http

Step 4: Firewall reload

[root@server ~]# firewall-cmd --reload

Access  Web interface phpMyAdmin on RHEL 8.9
Open the URL and Check


Grab AWS Course To Skill As Architects & Developers!
28 March 2023

Grab AWS Course To Skill As Architects & Developers!

With the expansion in digitalization and modernization, there is a rapid increase in the usage of cloud computing to have ease in the workplace. In recent times Amazon Web Services (AWS) are one of the most widely used platforms for cloud-based operations. Today, cloud-based AWS Training and Certification in Ahmedabad typically helps to work with DevOps engineers, developers, and other technology team members to reach the most efficient solutions for all their business needs. A wide range of courses for architects and developers are available from AWS. These courses are designed to be flexible so you can learn at your own pace and cover everything from fundamental ideas to more complex subjects.

What Is the Course You Can Scale Through AWS?

Here are probably the most famous AWS courses for architects and developers that are considered the best ones in today’s world:-

  • Associate AWS Certified Architect

This course is intended for architects who want to learn how to design and implement fault-tolerant, scalable systems on Amazon Web Services. It deliberates AWS security and compliance, architecture, storage and databases, computing and networking.

  • AWS Designer

This course’s target audience is developers who are interested in developing and arraying AWS applications. It discusses AWS serverless technologies, messaging services, security and compliance, and compute storage and database services.

  • Professional AWS Certified Architect

Experienced architects who want to learn how to design and deploy courses and attain Cloud Computing Certifications in Ahmedabad with advanced systems on AWS should take this course. It discusses AWS migration, advanced architectures, high availability, scalability, compliance, scalability, and elasticity.

  • Professional DevOps Engineer with AWS Certification

Developers and professionals in operations who want to learn how to automate application deployment and management on AWS are considered suitable. The DevOps Classes and Training in Ahmedabad help the candidate to have a wide knowledge of AWS networking and hybrid architectures, security and compliance, continuous delivery and deployment, and monitoring and logging of the system.

  • Specialty

AWS Certified Advanced Networking courses offer the architects who want to learn how to design and implement advanced networking solutions. It also focuses on AWS organizing ideas, AWS VPN, AWS Direct Associate, AWS Highway 53, and AWS Security Training in Ahmedabad.


AWS courses are perceived by the business and can assist you with propelling your vocation. Employers place a high value on AWS certifications, which can help you stand out from other applicants when applying for jobs. These courses are an extraordinary way for architects and developers to successfully utilize AWS benefits. They cover everything from essential ideas to cutting-edge themes and are adaptable and intuitive.

At Highsky IT Solutions, AWS courses are designed to be interactive, allowing you to put what you learn into practice in real-world situations. They provide easy learning through online, classroom and corporate training modes and help to scale your skills and job prospects.

Linux Advanced - Process Management by Highskyit Solution
22 February 2023

Linux Advanced – Process Management by Highskyit Solution

Enrich your career by joining the Linux Advanced course by Highskyit Solution 

We live in a world where new technologies & tools emerge every year. To deal with the current marketing technology, you need to upgrade yourself! So, in this blog, we’ll focus on why Linux Advanced is the best platform to start your career. Continue this blog to understand the structure of the Linux Administration Management Course Ahmedabad.

What you’ll learn in this course?

If we talk about the Linux utilization trend, it is referred to as the platform, usually for servers. But recently, the Linux platform has undergone several interactions with UI modifications suitable for personal use. Multiple individuals are using this all across the globe. Do you want to enrich your career by getting a certification as an advanced professional in Linux; you can talk with the consultants of Highsky IT Solutions. 

When you join the course, you will get solid Linux skills & great understanding of Linux concepts. You will become a master in understanding all the essential Linux commands. You can also join the Kubernetes Course Ahmedabad. Once you complete this course, you can apply for various Linux jobs.

Why should you join such courses?

  • Receive High security: Security is the central aspect of acquiring knowledge in Linux. The Linux platform is more stable when compared to the other windows platform. It is used in various organizations for tightening up security & maintaining high-security standards. This is an open-source platform, so the users don’t need to pay a single cost.
  • Get high stability: The Linux platform is known for stability purposes. The best part about this platform is the users don’t experience frequent crashes that ultimately benefit the organization. The uptime for the Linux servers is high, and that’s why it is considered the highest number of servers running on the internet. You can also join Python Courses in Ahmedabad.
  • Easy to maintain: The platform of Linux is easy to maintain. There is no extra cost associated with this platform, and that’s why it is known as a user-friendly platform. This is getting popular among people because of the flexibility & ease of using the feature.

Current market trends of Linux:

When it comes to the Linux software or Microsoft Azure Certification Ahmedabad, there are a lot of scopes because it is an open-source platform. The opportunities after completing this course are high for the fresher also. This course is flexible for newbie’s. The salary range for positioning in this job role depends upon the location, organization type & years of experience you have.

If you also want to showcase your talent & want to add a certain level of excellence to your career, you can join this course.

WhatsApp chat