explinux – ExpLinux https://www.explinux.com Explore Linux How to, Tutorials, Unix, Updates, Technology. Tue, 01 Aug 2023 20:45:21 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 https://www.explinux.com/wp-content/uploads/2023/04/cropped-favicon-32x32-1-32x32.png explinux – ExpLinux https://www.explinux.com 32 32 Variables in Bash Scripting: A Beginner’s Guide https://www.explinux.com/2023/08/variables-in-bash-scripting.html https://www.explinux.com/2023/08/variables-in-bash-scripting.html#respond Tue, 01 Aug 2023 20:45:17 +0000 https://www.explinux.com/?p=895 Variables in Bash Scripting: A Beginner’s Guide Read More »

]]>
Variables in Bash Scripting: A Beginner’s Guide
Variables in Bash Scripting A Beginners Guide Variables in Bash Scripting
Variables in Bash Scripting: A Beginner’s Guide

As a newbie to the world of Linux and scripting, understanding the concept of variables in Bash scripting can be both essential and intriguing. Variables play a fundamental role in storing and manipulating data within a script, allowing you to create dynamic and interactive scripts. Always use variables in the script to make your life easier. In this article, we’ll learn the basics of variables in Bash scripting, how to declare the variable in Bash scripting and use it, and interactive examples with commands to help you grasp the concept effectively.

If you are new to bash script read: How to write your first bash script

What are Variables in Bash Scripting?

In any programming, a variable is a symbolic name or identifier that represents a value or data stored in the computer’s or server’s memory. Variables act as containers that hold different types of information, such as numbers, text, filenames, and more. In Bash scripting, variables enable you to store values temporarily in memory and reference them throughout your script and you can use the same multiple times because Bash is dynamically typed, making it easier to work with data dynamically.

Declaring Variables in Bash

In Bash, declaring a variable is as simple as assigning a value to it with a “=” sign. There are no data types required when declaring a variable; Bash automatically determines the type based on the context. To declare a variable in bash, use the below syntax:

variable_name=value

For example, to store the value “Hello, Explinux!” in a variable called as below example :

greeting="Hello, Explinux!"

Remember that there should be no spaces around the equal sign when declaring a variable in Bash scripting. For string use “” and number you can use 1 or any number without “”.

Using Variables in Bash

Once we have declared a variable, you can use it throughout your script by referencing its name with a dollar sign ($). For example, to print the value of the greeting variable which we have declared before, you can use the echo command:

greeting="Hello, Explinux!"
echo $greeting

The output of the script will be when you run it :

Hello Explinux!

Using the dollar sign ($) before the variable name in the script tells Bash to substitute the variable with its value during execution.

Commands with Variables

Variables in Bash are not limited to static values; they can also hold the output of commands and that is useful to write automation scripts. By enclosing the Linux command in backticks (`) or using the $() syntax, you can capture the command’s output and store it in a variable.

Example: Command Output in a Variable

#!/bin/bash
# Command Output in a Variable

# Store the current date in a variable using backticks
current_date=`date`

# Print the value of the variable
echo "Current Date: $current_date"

In this above example, the date command retrieves the current date, and we store the output in the current_date variable. The echo command then displays the value of the current_date variable in the terminal, showing the current date when the script is run.

Example: Command Output in a Variable with $()

#!/bin/bash
# Command Output using $() in a Variable.

# Store the output of the 'ls' command in a variable using $()
files=$(ls)

# Print the value of the variable
echo "Files in the current directory: $files"

Here, the ls command lists the files in the current directory where the script is executed. We use the $() syntax to capture the output of the ls command and store it in the files variable. The echo command then displays the stored value of the files variable, after execution, it will show the list of files in the directory.

Rules for Naming Variables

When naming variables in Bash scripting, you need to follow certain rules to define variables:

  1. Variable names must begin with an alphabetic letter (a-z or A-Z) or an underscore (_).
  2. After the first character, variable names can also include digits (0-9).
  3. No spaces are allowed in variable names in the bash script.
  4. Variable names are case-sensitive. For example, greeting and Greeting are considered two different variables. This is due to Linux also case sensitive.

Arithmetic with Variables

Performing arithmetic operations in Bash scripting is a good example to learn variables. Let’s see an example of how to use variables for arithmetic:

#!/bin/bash
# Arithmetic with Variables

# Declare two variables
num1=10
num2=5

# Perform arithmetic operations
sum=$((num1 + num2))
difference=$((num1 - num2))
product=$((num1 * num2))
quotient=$((num1 / num2))

# Print the results
echo "Sum: $sum"
echo "Difference: $difference"
echo "Product: $product"
echo "Quotient: $quotient"

In this example, we declare two variables num1 and num2 and perform various arithmetic operations (addition, subtraction, multiplication, and division) using these two variables. The output will be using the echo command, demonstrating how variables can store and manipulate data in Bash script.

Accepting User Input as Variable

Variables are also useful for accepting user input and processing or manipulating it in the script. Let’s see below a simple script example that takes the user’s name as input and greets them:

#!/bin/bash
# Accept User Input and Greet

# Ask the user for their name
read -p "Enter your name: " name

# Greet the user with variable name($name)
echo "Hello, $name! Nice to meet you."

In this script, we use the read command to prompt the user for their name and store the input in the name variable. The entered name by the user is then used in the greeting message when the script is executed. This is just an example you can use commands as well or any other input.

Conclusion

Variables are the building blocks of Bash scripting, enabling you to store, manipulate, and interact with data dynamically. With the knowledge of how to declare and use variables, you can create more flexible and powerful Bash scripts. Remember the basic syntax for declaring variables, use the dollar sign ($) to reference their values, and follow the rules for naming variables.

As you continue your journey into the world of Bash scripting, the understanding of variables will become more crucial as you explore advanced concepts like loops, conditionals, and functions. Practice creating scripts that utilize variables in various scenarios, and you’ll soon gain confidence in your ability to develop efficient and functional Bash scripts to automate tasks and enhance your productivity. Happy scripting

]]>
https://www.explinux.com/2023/08/variables-in-bash-scripting.html/feed 0
How to Write and Run First Bash Script https://www.explinux.com/2023/08/how-to-write-first-bash-script.html https://www.explinux.com/2023/08/how-to-write-first-bash-script.html#respond Mon, 31 Jul 2023 20:52:28 +0000 https://www.explinux.com/?p=879 How to Write and Run First Bash Script Read More »

]]>
How to Write and Run First Bash Script
How to Write and Run First Bash Script

If you’re new to the world of Linux Administration and scripting, writing your first Bash script might seem intimidating. However, fear not! Bash scripting is a very beginner-friendly way to automate tasks and interact with the command-line interface, it is the first step to automation. In this article, we’ll guide you through the process of writing and running your very first Bash script.

Read More : Introduction to Bash scripting

Getting Started

To begin, open a text editor on your system. You can use your favorite plain text editor like vi or nano.

If you do not know VI editor read: How to use vi editor

Write the First Bash Script

In the text editor, type the following lines to create your Hello World Bash script:

If you are using vi editor give the name with .sh extension. Like below example

  • # vi hello_world.sh

#!/bin/bash
# This is a simple Hello World Bash script
echo "Hello, World!"

Let’s understand the code :

#!/bin/bash: The first line is called the “shebang,” which tells the system to use the Bash interpreter to run the script. It ensures that the bash script is executed using the correct shell. Sometimes it can be changed if you are using a customized system otherwise it will be the same for all Linux systems.

# This is a simple Hello World Bash script: This line is a comment. Comments start with the # symbol and are ignored by the Bash interpreter. They provide useful information to user or if you share the script with some other guy this will tell about the script’s purpose and help understand the code.

echo "Hello, World!": The command echo in Linux Bash is used to display messages on the terminal or shell. Our script will print “Hello, World!” when the script is executed. In this place, you can use any command like ls, df -h, or any it will run.

Save the Script

After writing the script, save the bash script with a meaningful name and the .sh extension. For example, you can save it as hello_world.sh in our case. If you are using vi or nano then we may have already given it a meaningful name and saved it with press the esc button and writing “:wq!” press enter key.

Make the Script Executable

Before running our bash script, we need to make it executable. Open your terminal or command prompt and navigate to the directory where you saved the script or you have to provide the path as well with the script. Then, use the following chmod command to give execute permissions to the script:

# chmod +x hello_world.sh

The chmod command changes file permissions, you can use the man command to check more usages and +x makes the script executable for the current user.

Run the Script

From the above action, your script is now executable, it’s time to run it! In the terminal or command prompt shell, enter the below command:

./hello_world.sh

or

sh hello_world.sh

The ./ before the script name specifies the current directory and default shell, and then the script name is provided. sh is also to tell the script is a shell script and runs from the default shell. Press Enter to run script , and you should see the output:

Hello, World!

Congratulations! You have successfully written and run your first Hello World Bash script journey. Now you are one step ahead.

Troubleshooting

If you encounter any issues running the bash script, follow the below steps to troubleshooting :

  • The shebang (#!/bin/bash) is the first line of the bash script.
  • The bash script file should have the .sh extension.
  • The script has to execute permissions (use chmod +x) or use chmod u+x script name.
  • You are running the script from the correct directory (use ./ before the script name). If not give a full path like ./home/username/hello_world.sh.

Conclusion

Writing and running your first Hello World Bash script is an exciting milestone in your journey as a Linux automation programmer. With this basic foundation, you can continue exploring Bash scripting and its many possibilities to automate tasks and reduce manual errors. As you gain more experience with time, you’ll find yourself creating powerful scripts to automate tasks and streamline your workflow. So keep practicing, experiment with different commands in place of echo, and embrace the world of Bash scripting! Happy scripting!

]]>
https://www.explinux.com/2023/08/how-to-write-first-bash-script.html/feed 0
Introduction to Bash Scripting – An Essential Part of Administration https://www.explinux.com/2023/08/introduction-to-bash-scripting.html https://www.explinux.com/2023/08/introduction-to-bash-scripting.html#respond Mon, 31 Jul 2023 19:33:37 +0000 https://www.explinux.com/?p=868 Introduction to Bash Scripting – An Essential Part of Administration Read More »

]]>
Introduction to Bash Scripting
Introduction to Bash Scripting Variables in Bash Scripting

Bash scripting is a powerful tool for system administrators that allows users to automate repetitive tasks, automate workflows, and perform complex operations in a command-line environment. If you’ve never worked with bash scripting before, it might seem daunting at first, but if you are familiar with Linux basics then with a little guidance, you can quickly grasp the fundamentals and start harnessing the full potential of the Bash shell scripting. Let’s start your journey of Bash scripting.

If you interested in Linux Directory Structure

What is Bash Scripting?

Bash, short for “Bourne Again Shell,” is a Unix shell and cli language that provides an interface for users to interact with the Linux operating system. Bash scripting involves writing a series of Linux commands, often referred to as a script, to be executed by the Bash shell. These scripts are essentially small programs that can automate tasks or perform various operations on the system- to reduce task time and manual errors. If you are using a Linux Operating system it is already prebuilt and no third-party installation or setting is required. If you are able to run the command you will able to use bash script.

For example, let’s start with  “Hello, World!” to the terminal:

#!/bin/bash
# This is a simple Bash script
echo "Hello, World!"

Save the above code in a file named hello_world.sh and make this script executable with chmod +x hello_world.sh. Then, run the script using ./hello_world.sh or sh hello_world.sh. The output “Hello, World!” will be displayed on the terminal.

Getting Started with Bash Variables

Variables in any script are used to store data that can be later manipulated or referenced in the script. They are for holding information that changes throughout the script’s execution. Likely a dynamic script it can be defined before use

Below example of using variables to greet a user:

#!/bin/bash
# Example of using variables use in bash script 
name="explinux"
echo "Hello, $name! How are you today?"

Save the above code in a file named greeting.sh and make this script executable with chmod +x greeting.sh. Then, run the script using ./greeting.sh or sh greeting.sh. The output “Hello, explinux! How are you today?” will be displayed on the terminal. Where $name is replaced with the value we have stored in the variable.

Conditional Statements in Bash

Conditional statements allow you to make decisions in our automation script based on given certain conditions like other programming languages. The most commonly used conditional for any script statement in Bash is the if statement which is similar to any other programming language. Only the written part is different we need to tell where the condition ends.

Let’s create a script that checks if a number is positive or negative with the bash script :

#!/bin/bash
# Example of using conditional statements
read -p "Enter a number: " num

if [ $num -gt 0 ]; then
    echo "The number is positive."
elif [ $num -lt 0 ]; then
    echo "The number is negative."
else
    echo "The number is zero."
fi

Save the above code in a file named positive_negative_check.sh, make it executable, and then run the script as we did in the above examples. Enter a number, and the script will display whether the number is positive, negative, or zero.

Looping in Bash

Loops are used to repeat a set of commands or functions multiple times. In Bash, we have for and while loops to achieve this loop condition.

For example, let’s create a script that prints numbers from 1 to 5 using a for loop:

#!/bin/bash
# Example of using a for loop
for i in {1..5}; do
    echo "Number: $i"
done

Save the above code and name it number_loop.sh, make it executable with chmod -x number_loop.sh , and then run the script sh number_loop.sh or ./number_loop.sh. We will see the output with numbers from 1 to 5 printed on the terminal.

Conclusion

Bash scripting is a valuable skill for every Linux admin or Linux automation engineer. With just learning the basics of Bash scripting, we can enhance our productivity, automate tasks, and simplify complex operations on our systems. We covered the essential concepts of Bash scripting, including creating scripts, using variables, implementing conditional statements, and employing loops. With this foundation, you can start playing with Bash scripting. We have a full list or articles on bash scripting check those out to learn more. So, start scripting, and enjoy the power of automation!

]]>
https://www.explinux.com/2023/08/introduction-to-bash-scripting.html/feed 0
Calling All Writers: Join Our Linux Blogging Community! https://www.explinux.com/2023/07/calling-all-writers-join-our-linux-blogging-community.html https://www.explinux.com/2023/07/calling-all-writers-join-our-linux-blogging-community.html#respond Mon, 10 Jul 2023 18:38:22 +0000 https://www.explinux.com/?p=858 Calling All Writers: Join Our Linux Blogging Community! Read More »

]]>
Are you passionate about sharing your knowledge, experiences, and insights with the world? Do you have a knack for crafting compelling narratives and informative articles? If so, we invite you to become a part of our vibrant blogging community!

Our blog is a platform dedicated to Linux ,ESXI and System Admin . We believe in the power of written words to inspire, educate, and entertain. Whether you are an aspiring writer, an industry expert, or simply someone with a unique perspective, we welcome you to contribute your voice to our blog.

Writing for our blog offers you a wonderful opportunity to showcase your talent, expand your audience, and make a meaningful impact. Share your expertise on a wide range of topics, from technology and science to arts, culture, lifestyle, and more. Our diverse readership eagerly awaits fresh perspectives and thought-provoking content.

Joining our blogging community means being a part of a supportive network of passionate writers. Engage in meaningful discussions, receive constructive feedback, and connect with fellow enthusiasts who share your passion for the written word. Together, we can create a thriving ecosystem of creativity and knowledge exchange.

So, grab your pen or keyboard and let your thoughts flow onto the digital canvas. Inspire, inform, and entertain our readers with your unique insights and captivating storytelling. Your voice matters, and we are excited to have you as a valuable contributor to our blog.

Take the first step and reach out to us today. Join our blogging community and let your words make a lasting impact on readers around the globe. Together, let’s create a world of inspiration, connection, and shared knowledge through the power of blogging.

If you want to share knowledge on the below topics. Please send the article in Word doc to us at writer@explinux.com with the subject “explinux-{topic}”

 

Linux Installation and Setup – Ubuntu, RHEL , Rocky
Command-Line Interface (CLI) and Shell Scripting
Linux Package Management – YUM and APT
User and Group Management
Linux File Permissions and Security
Linux Networking and Internet Connectivity
Linux Process Management
Linux Kernel and Device Drivers
Linux File Systems and Disk Management
Linux System Monitoring and Performance Tuning
Linux Backup and Recovery
Linux Virtualization and Containerization
Linux Server Configurations (Web, Database, DNS, Monitoring )
Linux Text Editors (nano)
Linux Desktop Environments (GNOME, KDE, Xfce, etc.)
Linux System Logs and Log Analysis
Linux Security Best Practices
Linux Firewalls and Network Security
Linux System Updates and Patch Management
Linux Shell Tools and Utilities
Linux Multimedia Applications and Tools
Linux Database Management (MySQL,MariaDB and PostgreSQL)
Linux Remote Administration and SSH
Linux High Availability and Load Balancing
Linux Cloud Computing and Deployment
Linux Shell Scripting Best Practices
Linux Troubleshooting and Debugging
Linux System Automation with Cron and systemd
Linux Data Encryption and Security
Linux IoT (Internet of Things) Applications
Linux for Developers (Programming Languages and Tools)

 

Rules to Submit Article

  1. Format: Submit your guest blog post in a Word document (.doc or .docx) format. This ensures compatibility and ease of editing.
  2. Grammar and Readability: Before sending your blog post, run it through a writing tool like Hemingway Editor (https://hemingwayapp.com/) to check for grammar errors and improve readability. Aim for a Hemingway grade level of less than 10.
  3. Plagiarism Check: Ensure that your guest blog post is original and free from plagiarism. Use any reliable online plagiarism checker tool to verify the uniqueness of your content.
  4. Word Count: Maintain a minimum word count of 600 words. This ensures that your blog post provides sufficient depth and valuable insights to readers.
  5. Author Information: Include your full name as the author of the guest blog post. Additionally, provide a brief bio or author’s note to introduce yourself to readers. Include a maximum of two social media account links, along with the name of your website or blog if applicable.
  6. Images: Include at least one relevant image in your guest blog post. The image should be of high quality, properly attributed (if necessary), and in a widely supported image format (such as JPEG or PNG). Ensure that you have the rights or permission to use the image.
  7.  Send it to writer@explinux.com

By following these rules, you can maintain professionalism in your guest blog post and ensure that it meets the required standards for submission.

]]>
https://www.explinux.com/2023/07/calling-all-writers-join-our-linux-blogging-community.html/feed 0
How To Use Cisco Server Diagnostics Utility (SDU) for Comprehensive Test | Easy 7-Step Guide https://www.explinux.com/2023/05/how-to-use-cisco-server-diagnostics-utility.html https://www.explinux.com/2023/05/how-to-use-cisco-server-diagnostics-utility.html#respond Tue, 09 May 2023 18:49:10 +0000 https://explinux.com/?p=841 How To Use Cisco Server Diagnostics Utility (SDU) for Comprehensive Test | Easy 7-Step Guide Read More »

]]>
In this article, we will see how to use Cisco Server Diagnostics Utility (SDU) to diagnose hardware issues in the Cisco server.

What is Cisco Server Diagnostics Utility (SDU)

Cisco Server Diagnostics Utility (SDU) is a software tool designed to diagnose hardware and software issues in Cisco Unified Computing System (UCS) servers. It provides detailed information about server components, such as processors, memory, and storage, and can help administrators identify problems and potential sources of issues.

SDU can be run from a variety of locations, including the operating system, the server management controller, or a bootable USB device. It supports both standalone servers and servers that are part of a UCS domain.

SDU provides a variety of diagnostic tests, including memory tests, CPU tests, network adapter tests, and storage tests. The tool also provides detailed logs and reports that can help administrators troubleshoot issues and communicate with Cisco support if necessary.

Overall, Cisco SDU is a valuable tool for administrators who need to diagnose and troubleshoot issues with Cisco UCS servers. It can help improve server reliability and reduce downtime, which is critical for organizations that rely on their server infrastructure for mission-critical applications and services.

For more information, you can visit Link Cisco SDU

Why Test Required

Sometimes we are unable to check errors from logs or some errors that occur and after sometimes or after reboot it is gone.

As a proper diagnostics, we need to use Cisco Server Diagnostics Utility (SDU) to run the comprehensive test to better understand errors or find small errors which are impacting our production server.

Prerequisite

  • The server will go offline so plan for it.
  • KVM or Local Console access from DC to mount ISO
  • Need basic knowledge of how to boot server from ISO
  • It can take several hours so make sure nobody will interrupt or reboot the server while the test is in progress.

Steps To Use Cisco Server Diagnostics Utility (SDU) for Comprehensive Test

1- Boot from DVD and after boot accept the License

Cisco Server Diagnostics Utility (SDU)

2- You will see the overview page, here click on Diagnostics >Tests >Comprehensive

Main_Screen_Step2

3- Select all and click on Run Selected Diagnostics

comprehensive_test_step3

4- Click on Summary. Here monitor tasks summary

Comprehensive_Test_Progress
Comprehensive Test Compleate Step5 Variables in Bash Scripting
After completing the diagnostic

6- You can view the report after completion on click on the Task Name

Comprehensive_Test_Compleate

7- If there is any issue check on the resolution tab will show the resolution for the issue

Conclusion

Now we learned how to use Cisco Diagnostic Utility and how to run tests and test your hardware errors. For doing this we just required downtime and basic knowledge to boot from iso and everything will be done by the utility.

You may like: – ESXI Installation

]]>
https://www.explinux.com/2023/05/how-to-use-cisco-server-diagnostics-utility.html/feed 0
How to choose the right processor for your laptop and desktop: Useful Guide for 2023 https://www.explinux.com/2023/04/how-to-choose-the-right-processor-for-laptop.html https://www.explinux.com/2023/04/how-to-choose-the-right-processor-for-laptop.html#respond Fri, 21 Apr 2023 17:10:57 +0000 https://explinux.online/?p=809 How to choose the right processor for your laptop and desktop: Useful Guide for 2023 Read More »

]]>
How to choose the right processor for your laptop and desktop

In this article, we will see how to choose the right processor for your laptop and desktop. Even with zero knowledge you will able to figure out the best processor for your need with 100% accuracy.

Why CPU Selection is Important

Most of us in the IT field use Windows laptops and we need to create VM for our testing because most applications are hosted on Linux servers instead of dual boot we can use VM to have multiple machines That required more cores with high CPU performance, Even in Linux Operating System sometimes we need to use VM or high-end tasks.

Gamers buy laptops with i7 configuration but still, laptops do not give them the required performance as their friend because of CPU SKUs.

Even in content creation, some CPUs do perform well and sometimes they start hanging or crashing that effect full tasks and loose progress.

So for everyone, it is important to know how to choose the right processor for your laptop and desktop

Choose Processor Company

There are two main processor or CPU manufacturers AMD and INTEL. You can choose any one of them both are good only difference is that AMD is cheaper than Intel and Intel’s processor life is more than AMD’s processor life. In the first view, Intel is best but if your goal is not to stay in the old generation CPU after 5 years AMD can be chosen. Even it is your personal choice too so choose any brand of CPU. But in many cases still, Intel is best but it all depends on your requirement.

CPU AMD or Intel Variables in Bash Scripting

Please find the link for both CPU family lists:

Intel List of Intel CPU
AMDList of AMD CPU

Even you can find laptops and desktops in both CPU brands with the same specifications. Now the question arises how do know which CPU is better in your chosen brand?

CPU Brand Modifier

CPU AMD or Intel Brand modifier Variables in Bash Scripting

This is the main thing everyone knows, like in Intel – i3,i5,i7, etc, and AMD 5,6,7, etc. This is usually good categorization for the usage of CPU, the lower version is for simple tasks 5 is for the home heavy task, and so on. The last version is for best usages like graphical and high performance for 24 hours.

So if you are a moderate user go with the last third option for example if i9 is the highest and then i7,i5, and i3 are versions so choose the i5 this will give you the best performance at the home for moderate gaming editing and other tasks. If you are a professional go with the i7 but if you need to run your PC or laptop 24 hours with high performance choose the top model.

One thing to keep in mind high model will consume more electricity and you can not compromise with the motherboard and other parts. So the cost of other parts also increased.

CPU Suffix – Most Important

Variables in Bash Scripting

This is the most important part for how to choose the right processor for your laptop and desktop. Every common buyer ignores it and they found someone whose i5 is better than your i7 processor. So be careful when you buy a laptop or desktop may be the same generation some other company selling at a lower price this is the main reason.

Please find below the table for all devices this suffix is the same for both AMD and Intel so just check which is best for you.

Performance LaptopDesktopEmbedded
HighestHXKHL
High H/HKFUL
Medium PSHE
Power efficient UTUE
Low YX/XEE
Extremely lowG1-G7

Check this suffix before buying a laptop and desktop to avoid lower performance.

Generation and SKU or Version

How to choose the right processor for your laptop and desktop: Useful Guide for 2023

This is different in both Intel and AMD so try to buy the latest one or a higher number is the latest one. For example, the Intel 12650 is a newer version than the 12450 and the AMD 5800 is a newer version than the 5600. We have already given you the link above to get CPU details this can be easily identified by numbers so try to buy a higher number CPU if that is in your budget.

Cores of CPU

If you are looking for a Laptop or Desktop for multiprocessing like creating a virtual machine, or video editing or you are multitalented and do high-intensity work at the same time. Just check the CPU cores it should be more than 6 and if you want to use it only for a single task and GPU-related task in this category games also included 4-6 cores are enough.

Please find below the table for the CPU cores guide for how to choose the right processor for your laptop and desktop

Use Cores
Normal Browsing and MS office 2
Gaming with GPU 4-6
Gaming without GPU8+
Content creation and the heavy tasks or multiple VM 10+

Conclusion

Now you know how to choose the right processor for your laptop and desktop and you can make a better decision for your next laptop. Just think about your requirement and follow the above steps you will find best suited CPU for your usage.

]]>
https://www.explinux.com/2023/04/how-to-choose-the-right-processor-for-laptop.html/feed 0
100 Best Use Cases of Find Command in Linux -ExpLinux https://www.explinux.com/2023/02/100-use-of-find-command-in-linux.html https://www.explinux.com/2023/02/100-use-of-find-command-in-linux.html#respond Mon, 20 Feb 2023 20:05:50 +0000 https://explinux.online/?p=794 100 Best Use Cases of Find Command in Linux -ExpLinux Read More »

]]>
Find Command In Linux
Find Command in Linux
Find Command in linux

The very popular Linux admins friend find command in Linux was created as a part of the Unix operating system by Ken Thompson and Dennis Ritchie at Bell Labs in the golden era of new computer development in the 1970s. Thompson and Ritchie were two of the pioneer developers of the Unix operating system and also developed the mother of most programming language C programming language, C is mostly used for developing software for Unix-based systems. The find command in Linux and Unix operating systems is still widely used today for searching for files and directories on a system and performing operations on them.

Some Alternatives of Find Command

Related Post: MV Command

22 Most Useful Linux Commands

15 Linux Commands to Boost Productivity

Master Guide to Vi Editor

There are only locate is main alternatives to the find command in Linux, which gives it some competition but we have added 4 more alternatives that can be useful in specific tasks.

locate: The locate command is the fastest way to search for files and directories on a Linux system. Unlike the find command, locate command creates its database of file paths that are generated periodically, so it provides faster results than find but it may not always be up to date. It will not come default in the system we have to install it and before first use has to update the Database of locate command. Update duration will depend upon your system file number.

grep: The grep command is an awesome tool for searching for patterns in text files. It can also be used to search for files and directories by name, although it is not as versatile as the find command in Linux because it searches only in text files.

whereis: The whereis command in Linux is used to locate the binary, source, and manual page files for a specified command. It is a simple but useful tool that provides basic information about a command, including its all locations on the system. for example command may be in /bin/ /sbin/ or /usr/bin/ it will show all.

which: The which command is in Linux is also used to locate the binary for a specified command. Unlike whereis, it only provides the location (bin /usr/bin, etc) of the executable file for the command for your bash profile and does not provide information about its source code or manual pages.

findmnt: The findmnt command in Linux is used to find and display information about mounted file systems on a Linux and Unix system. It provides information about the mounted file system type, source, and target mounted on for each mounted file system.

These are some alternatives but the find command is still on top because it gives you real-time all details of the file and provides the ability to perform operations even in the script you can use the find command to get currently accurate results and perform operations on the right file.

Top 100 Use Cases of Find Command

Please find below examples

SNUseCommand
1Find files in a specific directory:find /path/to/directory -type f
2Find directories in a specific directory:find /path/to/directory -type d
3Find files with a specific name:find /path/to/directory -name “file_name”
4Find files with a specific extension:find /path/to/directory -name “*.extension”
5Find files based on their size:find /path/to/directory -size +10M
6Find files based on their modification time:find /path/to/directory -mtime +7
7Find files based on their access time:find /path/to/directory -atime +7
8Find files based on their inode number:find /path/to/directory -inum 123456
9Find files that are readable:find /path/to/directory -perm -444
10Find files that are writable:find /path/to/directory -perm -222
11Find files that are executable:find /path/to/directory -perm -111
12Find files that are owned by a specific user:find /path/to/directory -user user_name
13Find files that are owned by a specific group:find /path/to/directory -group group_name
14Find files with a specific user ID:find /path/to/directory -uid 123456
15Find files with a specific group ID:find /path/to/directory -gid 123456
16Find files that match a specific pattern:find /path/to/directory -regex “.*pattern.*”
17Find files that contain a specific word or phrase:find /path/to/directory -type f -exec grep -q “word or phrase” {} \; -print
18Find files that are symbolic links:find /path/to/directory -type l
19Find files that are hard links:find /path/to/directory -type f -links +1
20Find files that are empty:find /path/to/directory -empty
21Find files that are not empty:find /path/to/directory ! -empty
22Find files and execute a specific command on each file:find /path/to/directory -type f -exec command {} \;
23Find files and move them to a new location:find /path/to/directory -type f -exec mv {} /path/to/new/location \;
24Find files and delete themfind /path/to/directory -type f -exec rm -i {} \;
25Find files and copy them to a new location:find /path/to/directory -type f -exec cp {} /path/to/new/location \;
26Find files and change the permissions on each file:find /path/to/directory -type f -exec chmod 755 {} \;
27Find files and change the owner of each file:find /path/to/directory -type f -exec chown user:group {} \;
28Find files and change the group of each file:find /path/to/directory -type f -exec chgrp group_name {} \;
29Find files and print the full path of each file:find /path/to/directory -type f -printf “%p\n”
30Find files and print the size of each file:find /path/to/directory -type f -printf “%s\n”
31Find files and print the inode number of each file:find /path/to/directory -type f -printf “%i\n”
32Find files and print the modification time of each file:find /path/to/directory -type f -printf “%T@\n”
33Find files and print the user name of the owner of each file:find /path/to/directory -type f -printf “%u\n”
34Find files and print the group name of the owner of each file:find /path/to/directory -type f -printf “%g\n”
35Find files and print the permissions of each file:find /path/to/directory -type f -printf “%M\n”
36Find files and execute a command with a specific time limit:find /path/to/directory -type f -mmin +5 -exec command {} \;
37Find files and execute a command only if the file has been modified in the last 5 minutes:find /path/to/directory -type f -mmin -5 -exec command {} \;
38Find files and execute a command only if the file has not been modified in the last 5 minutes:find /path/to/directory -type f ! -mmin -5 -exec command {} \;
39Find files and search for a specific string in each file:find /path/to/directory -type f -exec grep “string” {} \;
40Find files and list only the first 10 files that match a specific criteria:find /path/to/directory -type f -print | head -10
41Find files and list only the last 10 files that match a specific criteria: find /path/to/directory | head 10
42Find files and exclude a specific directory from the search:find /path/to/directory -type f -not -path “/path/to/directory/to/exclude/*” -print
43Find files and exclude multiple directories from the search:find /path/to/directory -type f \( -not -path “/path/to/directory/to/exclude/*” -and -not -path “/path/to/directory/to/exclude2/*” \) -print
44Find files and search for files with a specific name pattern:find /path/to/directory -type f -name “*.txt”
45Find files and search for files with a specific size:find /path/to/directory -type f -size +100M
46Find files and search for files smaller than a specific size:find /path/to/directory -type f -size -100M
47Find files and search for files larger than a specific size:find /path/to/directory -type f -size +100M
48Find files and search for files of an exact size:find /path/to/directory -type f -size 100M
49Find files and search for files with a specific user owner:find /path/to/directory -type f -user user_name
50Find files and search for files with a specific group owner:find /path/to/directory -type f -group group_name
51Find files and search for files with a specific type of permissions:find /path/to/directory -type f -perm 644
52Find files and search for files that are writable:find /path/to/directory -type f -perm -222
53Find files and search for files that are readable:find /path/to/directory -type f -perm -444
54Find files and search for files that are executable:find /path/to/directory -type f -perm -111
55Find files and search for files with specific type of executability:find /path/to/directory -type f -perm /u=x,g=x
56Find files and search for files that have changed in the last 7 days:find /path/to/directory -type f -ctime -7
57Find files and search for files that have changed more than 7 days ago:find /path/to/directory -type f -ctime +7
58Find files and search for files that have been modified in the last 7 days:find /path/to/directory -type f -mtime -7
59Find files and search for files that have been modified more than 7 days ago:find /path/to/directory -type f -mtime +7
60Find files and search for files that have been accessed in the last 7 days:find /path/to/directory -type f -atime -7
61Find files and search for files that have not been accessed in the last 7 days:find /path/to/directory -type f -atime +7
62Find files and search for files that match multiple criteria:find /path/to/directory -type f \( -name “*.txt” -or -name “*.pdf” \) -and -size +100M
63Find files and delete the files that match certain criteria:find /path/to/directory -type f -name “*.bak” -delete
64Find files and print the output in a specific format:find /path/to/directory -type f -printf “%p %u %g %s\n”
65Find files and execute a specific command on the matching files:find /path/to/directory -type f -exec chmod 644 {} \;
66Find files and limit the number of results to display:find /path/to/directory -type f -print | head -10
67Find files and sort the results by file size:find /path/to/directory -type f -printf “%s %p\n” | sort -nr
68Find files and exclude specific files or directories from the results:find /path/to/directory -type f \( ! -name “*.bak” ! -path “/path/to/directory/to/exclude/*” \) -print
69Find files and search for files based on their inode number:find /path/to/directory -type f -inum 123456
70Find files and search for files based on their access time and modification time:find /path/to/directory -type f -anewer file.txt -or -mnewer file.txt
71Find files and search for files with a specific type of type:find /path/to/directory -type l -ls
72Find files and search for files with a specific type of type and perform an action on them:find /path/to/directory -type l -exec ls -l {} \;
73Find files and search for files based on the number of links:find /path/to/directory -type f -links +5
74Find files and search for files based on the number of links and perform an action on them:find /path/to/directory -type f -links +5 -exec ls -l {} \;
75Find files and search for files based on the type of file system they are on:find /mnt/c/ -type f -fstype xfs
76Find files and search for files with a specific owner:find /path/to/directory -type f -user username
77Find files and search for files with a specific group:find /path/to/directory -type f -group groupname
78Find files and search for files with a specific permissions:find /path/to/directory -type f -perm 0644
79Find files and search for files with a specific name and perform a certain action on them:find /path/to/directory -type f -name “*.log” -exec gzip {} \;
80Find files and search for files that match a certain pattern and perform a certain action on them:find /path/to/directory -type f -regex “.*\.\(jpg\|jpeg\|png\)” -exec cp {} /path/to/destination/ \;
81Find files and search for files that have been modified in the last 7 days and perform a certain action on them:find /path/to/directory -type f -mtime -7 -exec rm {} \;
82Find files and search for files that have a specific size and perform a certain action on them:find /path/to/directory -type f -size +100M -exec mv {} /path/to/destination/ \;
83Find files and search for files that have a specific size range and perform a certain action on them:find /path/to/directory -type f -size +10M -size -100M -exec cp {} /path/to/destination/ \;
84Find files and search for files that have a specific size range and print the results in a specific format:find /path/to/directory -type f -size +10M -size -100M -printf “%p %u %g %s\n”
85Find files and search for files that have a specific name and move them to a specific location:find /path/to/directory -type f -name “*.log” -exec mv {} /path/to/destination/ \;
86Find files and search for files that have a specific name and copy them to a specific location:find /path/to/directory -type f -name “*.log” -exec cp {} /path/to/destination/ \;
87Find files and search for files that have a specific name and count the number of matches:find /path/to/directory -type f -name “*.log” | wc -l
88Find files and search for files that have a specific name and delete the matches:find /path/to/directory -type f -name “*.log” -delete
89Find files and search for files that have a specific name and rename the matches:find /path/to/directory -type f -name “*.log” -exec mv {} {}.bak \;
90Find files that have been modified in the last day and delete them:find /path/to/directory -type f -mtime -1 -delete
91Find files that have been modified in the last 7 days and compress them:find /path/to/directory -type f -mtime -7 -exec gzip {} \;
92Find files that have a specific name and show the details in a human-readable format:find /path/to/directory -type f -name “*.log” -exec stat -c “%n %s %y” {} \;
93Find all symbolic links and delete them:find /path/to/directory -type l -delete
94Find all symbolic links and replace them with their targets:find /path/to/directory -type l -exec sh -c ‘ln -sf “$(readlink -f “$1″)” “$1″‘ _ {} \;
95Find all symbolic links that point to a specific location and delete them:find /path/to/directory -type l -lname “/path/to/link/target” -delete
96Find all files that are larger than a specific size and delete them:find /path/to/directory -type f -size +100M -delete
97Find mp3 files in ext4 filesystemfind /mnt/usb/ -type f -fstype ext4 | grep -i ‘\.mp3$’
98Find files that have been modified in the last hour and move them to a different location:find /path/to/directory -type f -mmin -60 -exec mv {} /path/to/destination/ \;
99Find commnad in linux with sed command . Find file and replace text mylinux to explinuxfind my_files -type f -name ‘*.txt’ -exec sed -i ‘s/mylinux/explinux/g’ {} \;
100Find process pid status and print from proc find /proc/1234 -maxdepth 0 -name status -o -name stat -exec cat {} \;
Find Command in Linux – explinux

Feel free to provide you advice and a new or effective way to use the find command in Linux.

Conclusion:

Here we have seen 100 use cases of the find command in Linux and this can be used in a script or in daily use of system admin and troubleshooting tasks using the find command.

]]>
https://www.explinux.com/2023/02/100-use-of-find-command-in-linux.html/feed 0
A Comprehensive Guide to the “mv” Command for Renaming Files in Linux 2023 https://www.explinux.com/2023/01/command-for-renaming-files-in-linux.html https://www.explinux.com/2023/01/command-for-renaming-files-in-linux.html#respond Thu, 19 Jan 2023 19:36:19 +0000 https://explinux.online/?p=784 A Comprehensive Guide to the “mv” Command for Renaming Files in Linux 2023 Read More »

]]>
Renaming files in Linux is an important part of basic file management. mv command was written by Ken Thompson. With the “mv” command, you can quickly and easily rename your files in a few simple steps. This guide provides a step-by-step overview of the process so you can get organized fast!

Renaming Files in Linux

Understand the Basics of the mv Command

The “mv” command is an abbreviation for “move” and is used to rename files or directories in Linux. By using the syntax mv Old_Filename New_Filename, you can move a target file or folder from its current location to a new location you specify. This command also allows you to rename files or folders by simply specifying the same source and destination. This is the most common and useful command for all Linux administrators.

Related article: 22 Linux Commands you should learn now

Move and Rename Files at Once With mv

In addition to renaming files, you can use the mv command to move a file by simply combining both a relocation and naming action into one command. For example, if you have a file called “mysecrete.txt” which is currently in the current working directory and want to move it to the “TopSecrete” folder and rename it as “mynewsecrete.txt”, all you need to do is use the below command:

# mv mysecrete.txt /TopSecrete/mynewsecrete.txt 

or If you want to rename on the same directory just use the below command :

# mv mysecrete.txt mynewsecrete.txt

This way, you will be able to move and rename your file in one simple step!

Move Only When Source File is Newer

The mv command offers the option to move only newer source files because sometimes we move files and it rewrites on an existing file, So in case to avoid this situation, we can use the -u option. This is useful in case of backup or backup script and could save your time by not moving unnecessary files, use this command:

# mv -u myimportantfile.txt importantSubdirectory/

Copy a File Directory and Its Contents Using mv

You can copy a file or directory and all its content (subdirectories and files) using the mv command. To do this, simply give the directory name to your command to move the directory to another directory with all data. For example, as shown above you could use as below :

# mv olddirectory Subdirectory/

If you want to move only “olddirectory” content to a Subdirectory use * at end of the directory, it will loop through all contents of the directory and move it and the directory will be empty.

# mv olddirectory/* Subdirectory/

Interactive mv Command for Rename File

mv command never as before rename but in case we want to give confirmation before renaming or moving a Linux file we can use -i (interactive) with the mv command.

If this is the new file and no overwrite then it will rename and move the file without any prompt.

# mv -i myfile.txt yourfile.txt

It will not ask for any confirmation if yourfile.txt does not exist.

But in case of files exist with the same name. So each time before overwriting the file in Linux or moving, IT will prompt for confirmation we can enter “y” or “n” respectively to accept and reject

# # mv -i myfile.txt yourfile.txt
mv: overwrite ‘yourfile.txt’? 

It will ask for your confirmation and you can provide your input with “y” or “n” in small letters.

Alternatives of mv Commands

There are many other functions we can perform with other commands too like renaming the “rename” command but this is not installed by default.

“cp” Command to copy files but the original file will not be renamed or moved.

“rsync” and “scp” commands also copy files and we can rename them in the destination folder. These commands are basically used for the remote server’s file copy and sync.

Conclusion

In this article, we have learned how to rename files in Linux with the help of the mv command. Even we have seen some more use cases of the mv command with alternatives that we can think of performing the same kind of operation. But alternatives will keep the source file too.

Hope this helps you understand how to file rename in Linux

]]>
https://www.explinux.com/2023/01/command-for-renaming-files-in-linux.html/feed 0
We Asked 10 Linux Questions to ChatGPT and We Got Amazing Answers https://www.explinux.com/2023/01/10-linux-questions-to-chatgpt.html https://www.explinux.com/2023/01/10-linux-questions-to-chatgpt.html#respond Wed, 18 Jan 2023 08:22:38 +0000 https://explinux.online/?p=751 We Asked 10 Linux Questions to ChatGPT and We Got Amazing Answers Read More »

]]>
We Asked 10 Linux Questions to ChatGPT and We Got Amazing Answers

What is ChatGPT

If you are very busy and still did not hear about this internet buzz or you see it but did not actually know what it then we are here to tell you.
ChatGPT is a language model developed by OpenAI, it is one of the many AI chatbots of its kind, there are other AI models such as GPT-2 (a predecessor of ChatGPT) developed by OpenAI and other companies like Google, Microsoft, Amazon, and IBM have also developed similar models. Whenever you chat or mail to google or Microsoft every time the chatbot replies to your general queries, only in case of escalation humans are involved.

The inspiration behind the creation of ChatGPT and other AI models like it is to create a machine that can understand and generate human-like text. These models are based on a neural network architecture called the transformer, which has shown to be very effective at natural language processing tasks such as language translation, text summarization, and question answering.

The idea behind creating such models is to make the computer understand human language more efficiently so that it can be used in various industries like customer service, content creation, and more. These models are also being used to improve the accuracy and efficiency of machine learning models in a wide range of applications such as speech recognition, natural language understanding, and others.

Additionally, OpenAI’s goal is to advance AI in a way that is safe for humanity and to provide the most powerful AI technologies to those who will use them to benefit humanity. OpenAI aims to make this available to everyone so that the benefits of AI can be widely distributed.

Who Owns OpenAI?

Elon Musk, Sam Altman,Wojciech Zaremba, Ilya Sutskever,and , Greg Brockman founded OPENAI in 2015 . ELON musk stepped out in 2018 and the current CEO is Sam Altman. The most important event is that Microsoft invested 1 Billion dollars in OpenAI, Maybe in the future, you can see OpenAI features in your Windows Office applications

You may be Interested : Most Important 22 Linux Commands

We have asked 10 Linux questions to ChatGPT, and let’s see how amazing it’s answered it. Did ChatGPT able to clear the Linux System Admin interview?

10 Questions to ChatGPT

Create a User and the password expire in 60 days.

Create user with ChatGPT

ChatGPT has done good work and is able to give the correct answer to this basic question. So one point to ChatGPT.

How to delete User with home directory?

Delete user with help of chatgpt

ChatGPT again did good work it will help you delete the home directory of a user with the user account in Linux. For this question, you don’t need to go to StackOverflow. One point to this AI chatbot.

How to Troubleshoot SSH issues?

troubleshoot ssh issue with chatgpt Variables in Bash Scripting

Ohh here we are quite disappointed with ChatGPT’s answer because we all know “systemctl status ssh” will give us an error that ssh. service not found. The correct command is “systemctl status sshd“. We are disappointed because if a person with a beginner level works on this then he could try the second step to install the ssh server and in case ssh is installed he will be quite confused that why it not showing service available . The steps provided by ChatGPT AI is quite basic and maybe if we ask the second time we get other options but we have tried once and in one go we got basic steps.

So in this case 0 points to ChatGPT.

How to formate a 4TB harddisk ?

formate 4TB disk using chatgpt Variables in Bash Scripting

This is a trick question we have asked here ChatGPT failed to give the right answer. If you get what is wrong in this then congrats you are working on a good data center or Big project. If you are thinking about what is wrong with this then let me tell you above 2TB drive we have to use parted command otherwise you will get the error.

So 0 points to ChatGPT on this trick question.

Related : How to use parted command ?

how to create 500 GB LVM from 1 TB raw device in RedHat Linux?

Create LVM using chatgpt
Create lvm pvs and vgs using chatgpt

Awesome now as expected we have got out the correct answer from this popular AI chatbot. You can just copy and paste commands to create LVM in Linux just you need to change names as per your device and requirements.

Again ChatGPT has gained 1 more point.

How to extend 16 TB ext4 LVM to 24 TB in Redhat Linux?

Variables in Bash Scripting

Again ChatGPT failed in the trick question if you know then you are a good Linux Engineer. The issue is that we can not increase the ext4 partition by more than 16TB. After 16TB we have to use the xfs partition. So running all those commands will not give you any results.

Zero points to our ChatGPT

How to change all new user’s home directory in /newhome when we create users by default in Redhat Linux?

Create new home for new user using chatgpt

I think ChatGPT is very good at user management, So you can ask any question related to user management and just follow it because we got again the right answer.

One more point to ChatGPT.

Create a bash script to delete files from /tmp folder which is older than 60 days in RedHat Linux.

delete 60 days files from tmp using chatgpt Variables in Bash Scripting

This is just a simple script but it did a good job. For old system admins who use the “-exec rm -f {} \;” newer versions of the find command introduce -delete. So we can say that ChatGPT knows the new find command.

We have tried a simple bash script you can check with the complex script, if you like this article then we will ask ChatGPT other bash script questions.

We have to give 1 point to ChatGPT

How to restrict the root to delete the specific file?

make file not delete with chatgpt
Restrict root to delete file part2 using chatgpt Variables in Bash Scripting

This time ChatGPT shows us that it is just an AI, we all know we can not restrict root like that this could be possible partially but not 100% secure. The only two ways to restrict root are to change attribute and use SELinux which can also restrict root until the root user figure out what the issue is.

In our case, we will 0 points to ChatGPT. If you want to try and give more points let us know in the comments.

Related : What is Selinux ?

How to Disable Selinux ?

Create an NFS service dependent on /sanstorage mount point in Redhat Linux.

Nfs server help of chatgpt
Nfs server with dependency part2 with chatgpt Variables in Bash Scripting
NFS server with help of chatgpt with dependency

In this answer, we will give .5 marks to OpeAI chatbot because there are some other methods that we are using to create dependency for NFS and other services. That is correct but anyone can disable this service and start nfsd service.

So .5 for this answer.

Result

The final result for our question answer session of ChatGPT has got 5.5/10.

5.5/10

Conclusion

As we have seen ChatGPT is accurate to do simple and basic level quetions. But when we tried some trick question this AI chatbot is unable to give answers. As per our question answer we see for local user mangement tasks we can just copy paste but for other task we need to rely on our knowledge. For for the level 1 Job you can use ChatGPT with little guidence. ChatGPT is still learning let see when it cross L2 and L3 level.

Hope this will give you a good idea about OpenAI chatbot.

]]>
https://www.explinux.com/2023/01/10-linux-questions-to-chatgpt.html/feed 0
Upgrading ESXi 6.7 to 7 Update 3 via SSH and esxcli – Easy Steps https://www.explinux.com/2023/01/upgrading-esxi-6-7-to-7-update-3.html https://www.explinux.com/2023/01/upgrading-esxi-6-7-to-7-update-3.html#respond Sat, 14 Jan 2023 19:45:04 +0000 https://explinux.online/?p=742 Upgrading ESXi 6.7 to 7 Update 3 via SSH and esxcli – Easy Steps Read More »

]]>
We will cover upgrading ESXi 6.7 to 7 update 3 via SSH and esxcli command and walk through some key points like what is VIB, and ESXi profiles while updating. This method will directly work on VMware ESXi 6.5.0 build-15256549 and above.

Upgrading ESXi 6.7 to 7 Update 3 via SSH and esxcli - Easy Steps

Why Upgrade Required

Because your team lead told you to do so and the security team suggested your team lead for update all ESXi to version 7 and the security team got an alert from security scan software that your current version is vulnerable to security threats.

Realty apart that could be a reason but before the update, we need to know some basic points why we are upgrading a working ESXi, let’s come to the theory part. Below is the reason to update ESXi or any software/OS/Hypervisor.

  • Vulnerability in the previous version which is fixed by OEM.
  • New and useful updates by OEMs like ESXi 7 have support Kubernetes, can use pods, video memory increases, and support cross VCenter with new hardware versions and many more.
  • OEM end their support due to maintaining the new version.
  • New Operating Systems has supported the new hypervisor so we need to update ESXi.
  • Increase performance and monitoring system.

There are many more but just let’s jump on upgrading ESXi 6.7 to 7 update 3 via SSH and esxcli and we have covered some common questions and abbreviations in the end for your knowledge base.

Related Post:

ESXi Installation Step-By-Step

What is VMware?

Upgrading ESXi 6.7 to 7 Update 3 via SSH and esxcli

Prerequisite

  • Download Patch from the VMware site: Download
  • Download the bundle in “.zip” format
  • Upload bundle in ESXi datastore
  • Enter in maintenance mode or check we can do it by esxcli also
  • Enable SSH and ESXi shell (TSM and TSH-SSH)to login from ssh
enable TSH and TSH-SSH
enable SSH Login

Upgrade ESXi

Note: You have to give the full path of the zip bundle otherwise it may not work

  • Log in to ESXi via SSH and go to the path where you have uploaded the zip bundle for us it is in the “/vmfs/volumes/609abf69-1d682f78-0185-3cfdfee40d18/patch/” path
cd /vmfs/volumes/609abf69-1d682f78-0185-3cfdfee40d18/patch/

verify that the path and checks your zip bundle is there or not

If you have not activated the maintenance mode from GUI enabled by the command

esxcli system maintenanceMode set --enable=true
  • Check the Profile available in the zip bundle, not have to choose full. Only specific requirements we can choose no-tools otherwise use full. Or if single is available then choose that.
# esxcli software sources profile list -d /vmfs/volumes/609abf69-1d682f78-0185-3cfdfee40d18/patch/VMware-ESXi-7.0.3d-19482537-Custom-Dell-4.2.2-a-depot.zip
Name                                         Vendor  Acceptance Level  Creation Time        Modification Time
-------------------------------------------  ------  ----------------  -------------------  -------------------
Dell-UCS-Addon-ESXi-70U3d-19482537_4.2.2-a  Dell   PartnerSupported  2022-08-29T13:21:00  2022-08-29T13:21:00
  • Dry run to test if is it compatible or not. And we can even know before the activity we are doing is on the right track.
esxcli software profile update -d /vmfs/volumes/609abf69-1d682f78-0185-3cfdfee40d18/patch/VMware-ESXi-7.0.3d-19482537-Custom-Dell-4.2.2-a-depot.zip -p Dell-UCS-Addon-ESXi-70U3d-19482537_4.2.2-a --dry-run
Update Result
   Message: Dryrun only, host not changed. The following installers will be applied: [bootbank_ _Installer, LockerInstaller]
   Reboot Required: true
   VIBs Installed: CIS_bootbank_ __ucs-tool-esxi_1.2.2-1OEM, Dell_bootbank_ __nenic-ens_1.0.6.0-1OEM.700.1.0.15843807, Dell_bootbank_ __nenic_1.0.42.0-1OEM.670.0.0.8169922, Dell_bootbank_ __nfnic_4.0.0.87-1OEM.670.0.0.8169922, INT_bootbank_ __i40en_2.2.7.0-1OEM.700.1.0.15843807, INT_bootbank_ __igbn_1.9.1.0-1OEM.700.1.0.15843807, INT_bootbank_ __ixgben_1.12.3.0-1OEM.700.1.0.15843807, MEL_bootbank_ __nmlx5-core_4.21.71.101-1OEM.702.0.0.17630552, MEL_bootbank_ __nmlx5-rdma_4.21.71.101-1OEM.702.0.0.17630552, QLC_bootbank_ __qcnic_2.0.62.0-1OEM.700.1.0.15843807, QLC_bootbank_ __qedentv_3.40.57.0-1OEM.700.1.0.15843807, QLC_bootbank_ __qedf_2.2.86.0-1OEM.700.1.0.15843807, QLC_bootbank_ __qedi_2.19.87.0-1OEM.700.1.0.15843807, QLC_bootbank_ __qedrntv_3.40.56.0-1OEM.700.1.0.15843807, QLC_bootbank_ __qfle3_1.4.25.0-1OEM.700.1.0.15843807, QLC_bootbank_ __qfle3f_2.1.26.0-1OEM.700.1.0.15843807, QLC_bootbank_ __qfle3i_2.1.9.0-1OEM.700.1.0.15843807, VMW_bootbank_ __atlantic_1.0.3.0-8vmw.703.0.20.19193900, VMW_bootbank_ __bnxtnet_216.0.50.0-41vmw.703.0.20.19193900, VMW_bootbank_ __bnxtroce_216.0.58.0-23vmw.703.0.20.19193900, VMW_bootbank_ __brcmfcoe_12.0.1500.2-3vmw.703.0.20.19193900, VMW_bootbank_ __elxiscsi_12.0.1200.0-9vmw.703.0.20.19193900, VMW_bootbank_ __elxnet_12.0.1250.0-5vmw.703.0.20.19193900, VMW_bootbank_ __icen_1.4.1.7-1vmw.703.0.20.19193900, VMW_bootbank_ __ionic-en_16.0.0-16vmw.703.0.20.19193900, VMW_bootbank_ __irdman_1.3.1.20-1vmw.703.0.20.19193900, VMW_bootbank_ __iser_1.1.0.1-1vmw.703.0.20.19193900, VMW_bootbank_ __lpfc_14.0.169.25-5vmw.703.0.35.19482537, VMW_bootbank_ __lpnic_11.4.62.0-1vmw.703.0.20.19193900, VMW_bootbank_ __lsi-mr3_7.718.02.00-1vmw.703.0.20.19193900, VMW_bootbank_ __lsi-msgpt2_20.00.06.00-4vmw.703.0.20.19193900, VMW_bootbank_ __lsi-msgpt35_19.00.02.00-1vmw.703.0.20.19193900, VMW_bootbank_ __lsi-msgpt3_17.00.12.00-1vmw.703.0.20.19193900, VMW_bootbank_ __mtip32xx-native_3.9.8-1vmw.703.0.20.19193900, VMW_bootbank_ __ne1000_0.8.4-11vmw.703.0.20.19193900, VMW_bootbank_ __nhpsa_70.0051.0.100-4vmw.703.0.20.19193900, VMW_bootbank_ __nmlx4-core_3.19.16.8-2vmw.703.0.20.19193900, VMW_bootbank_ __nmlx4-en_3.19.16.8-2vmw.703.0.20.19193900, VMW_bootbank_ __nmlx4-rdma_3.19.16.8-2vmw.703.0.20.19193900, VMW_bootbank_ __ntg3_4.1.7.0-0vmw.703.0.20.19193900, VMW_bootbank_ __nvme-pcie_1.2.3.16-1vmw.703.0.20.19193900, VMW_bootbank_ __nvmerdma_1.0.3.5-1vmw.703.0.20.19193900, VMW_bootbank_ __nvmetcp_1.0.0.1-1vmw.703.0.35.19482537, VMW_bootbank_ __nvmxnet3-ens_2.0.0.22-1vmw.703.0.20.19193900, VMW_bootbank_ __nvmxnet3_2.0.0.30-1vmw.703.0.20.19193900, VMW_bootbank_ __pvscsi_0.1-4vmw.703.0.20.19193900, VMW_bootbank_ __qflge_1.1.0.11-1vmw.703.0.20.19193900, VMW_bootbank_ __rste_2.0.2.0088-7vmw.703.0.20.19193900, VMW_bootbank_ __sfvmk_2.4.0.2010-6vmw.703.0.20.19193900, VMW_bootbank_ __smartpqi_70.4149.0.5000-1vmw.703.0.20.19193900, VMW_bootbank_ __vmkata_0.1-1vmw.703.0.20.19193900, VMW_bootbank_ __vmkfcoe_1.0.0.2-1vmw.703.0.20.19193900, VMW_bootbank_ __vmkusb_0.1-6vmw.703.0.20.19193900, VMW_bootbank_ __vmw-ahci_2.0.11-1vmw.703.0.20.19193900, VMware_bootbank_ __bmcal_7.0.3-0.35.19482537, VMware_bootbank_ __cpu-microcode_7.0.3-0.35.19482537, VMware_bootbank_ __crx_7.0.3-0.35.19482537, VMware_bootbank_ __elx-esx-libelxima.so_12.0.1200.0-4vmw.703.0.20.19193900, VMware_bootbank_ __esx-base_7.0.3-0.35.19482537, VMware_bootbank_ __esx-dvfilter-generic-fastpath_7.0.3-0.35.19482537, VMware_bootbank_ __esx-ui_1.36.0-18403931, VMware_bootbank_ __esx-update_7.0.3-0.35.19482537, VMware_bootbank_ __esx-xserver_7.0.3-0.35.19482537, VMware_bootbank_ __esxio-combiner_7.0.3-0.35.19482537, VMware_bootbank_ __gc_7.0.3-0.35.19482537, VMware_bootbank_ __loadesx_7.0.3-0.35.19482537, VMware_bootbank_ __lsuv2-hpv2-hpsa-plugin_1.0.0-3vmw.703.0.20.19193900, VMware_bootbank_ __lsuv2-intelv2-nvme-vmd-plugin_2.7.2173-1vmw.703.0.20.19193900, VMware_bootbank_ __lsuv2-lsiv2-drivers-plugin_1.0.0-10vmw.703.0.35.19482537, VMware_bootbank_ __lsuv2-nvme-pcie-plugin_1.0.0-1vmw.703.0.20.19193900, VMware_bootbank_ __lsuv2-oem-dell-plugin_1.0.0-1vmw.703.0.20.19193900, VMware_bootbank_ __lsuv2-oem-hp-plugin_1.0.0-1vmw.703.0.20.19193900, VMware_bootbank_ __lsuv2-oem-lenovo-plugin_1.0.0-1vmw.703.0.20.19193900, VMware_bootbank_ __lsuv2-smartpqiv2-plugin_1.0.0-8vmw.703.0.20.19193900, VMware_bootbank_ __native-misc-drivers_7.0.3-0.35.19482537, VMware_bootbank_ __qlnativefc_4.1.14.0-26vmw.703.0.20.19193900, VMware_bootbank_ __trx_7.0.3-0.35.19482537, VMware_bootbank_ __vdfs_7.0.3-0.35.19482537, VMware_bootbank_ __vmware-esx-esxcli-nvme-plugin_1.2.0.44-1vmw.703.0.20.19193900, VMware_bootbank_ __vsan_7.0.3-0.35.19482537, VMware_bootbank_ __vsanhealth_7.0.3-0.35.19482537, VMware_locker_tools-light_11.3.5.18557794-19482531
   VIBs Removed: Adaptec_Inc_bootbank_ __scsi-aacraid_6.0.6.2.1.54013-1OEM.600.0.0.2494585, Avago_bootbank_ __scsi-megaraid-sas_6.610.16.00-1OEM.600.0.0.2494585, CIS_bootbank_ __ucs-tool-esxi_1.1.0-1OEM, Dell_bootbank_ __nfnic_4.0.0.40-1OEM.670.0.0.8169922, EMU_bootbank_ __brcmfcoe_12.0.1115.0-1OEM.670.0.0.7535516, EMU_bootbank_ __elxiscsi_12.0.1188.0-1OEM.670.0.0.8169922, EMU_bootbank_ __elxnet_12.0.1115.0-1OEM.670.0.0.7535516, EMU_bootbank_ __lpfc_12.2.212.10-1OEM.670.0.0.8169922, INT_bootbank_ __igbn_1.4.7-1OEM.670.0.0.8169922, INT_bootbank_ __ixgben_1.7.15-1OEM.670.0.0.8169922, INT_bootbank_ __net-i40e_2.0.7-1OEM.600.0.0.2494585, INT_bootbank_ __net-ixgbe_4.5.3-1OEM.600.0.0.2494585, MEL_bootbank_ __nmlx5-core_4.17.15.16-1OEM.670.0.0.8169922, MEL_bootbank_ __nmlx5-rdma_4.17.15.16-1OEM.670.0.0.8169922, QLC_bootbank_ __qcnic_1.0.26.0-1OEM.670.0.0.8169922, QLC_bootbank_ __qedentv_3.11.7.0-1OEM.670.0.0.8169922, QLC_bootbank_ __qedi_2.10.15.0-1OEM.670.0.0.8169922, QLC_bootbank_ __qedrntv_3.11.7.0-1OEM.670.0.0.8169922, QLC_bootbank_ __qfle3_1.0.86.0-1OEM.670.0.0.8169922, QLC_bootbank_ __qfle3f_1.0.68.0-1OEM.670.0.0.8169922, QLC_bootbank_ __qfle3i_1.0.23.0-1OEM.670.0.0.8169922, QLogic_bootbank_ __qlnativefc_3.1.16.0-1OEM.670.0.0.8169922, VMW_bootbank_ __ata-libata-92_3.00.9.2-16vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-amd_0.3.10-3vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-atiixp_0.4.6-4vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-cmd64x_0.2.5-3vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-hpt3x2n_0.3.4-3vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-pdc2027x_1.0-3vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-serverworks_0.4.3-3vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-sil680_0.4.8-3vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-via_0.3.3-2vmw.670.0.0.8169922, VMW_bootbank_ __block-cciss_3.6.14-10vmw.670.0.0.8169922, VMW_bootbank_ __bnxtnet_20.6.101.7-24vmw.670.3.73.14320388, VMW_bootbank_ __bnxtroce_20.6.101.0-20vmw.670.1.28.10302608, VMW_bootbank_ __char-random_1.0-3vmw.670.0.0.8169922, VMW_bootbank_ __ehci-ehci-hcd_1.0-4vmw.670.0.0.8169922, VMW_bootbank_ __hid-hid_1.0-3vmw.670.0.0.8169922, VMW_bootbank_ __i40en_1.8.1.9-2vmw.670.3.73.14320388, VMW_bootbank_ __ima-qla4xxx_2.02.18-1vmw.670.0.0.8169922, VMW_bootbank_ __ipmi-ipmi-devintf_39.1-5vmw.670.1.28.10302608, VMW_bootbank_ __ipmi-ipmi-msghandler_39.1-5vmw.670.1.28.10302608, VMW_bootbank_ __ipmi-ipmi-si-drv_39.1-5vmw.670.1.28.10302608, VMW_bootbank_ __iser_1.0.0.0-1vmw.670.1.28.10302608, VMW_bootbank_ __lpnic_11.4.59.0-1vmw.670.0.0.8169922, VMW_bootbank_ __lsi-mr3_7.708.07.00-3vmw.670.3.73.14320388, VMW_bootbank_ __lsi-msgpt2_20.00.06.00-2vmw.670.3.73.14320388, VMW_bootbank_ __lsi-msgpt35_09.00.00.00-5vmw.670.3.73.14320388, VMW_bootbank_ __lsi-msgpt3_17.00.02.00-1vmw.670.3.73.14320388, VMW_bootbank_ __misc-cnic-register_1.78.75.v60.7-1vmw.670.0.0.8169922, VMW_bootbank_ __misc-drivers_6.7.0-2.48.13006603, VMW_bootbank_ __mtip32xx-native_3.9.8-1vmw.670.1.28.10302608, VMW_bootbak_ne1000_0.8.4-2vmw.670.2.48.13006603, VMW_bootank_nenic_1.0.29.0-1vmw.670.3.73.14320388, VMW_boobank_net-bnx2_2.2.4f.v60.10-2vmw.670.0.0.8169922, VMW_bootbank_ ____net-bnx2x_1.78.80.v60.12-2vmw.670.0.0.8169922, VMW_bootbank_ ____net-cdc-ether_1.0-3vmw.670.0.0.8169922, VMW_bootbank_ ____net-cnic_1.78.76.v60.13-2vmw.670.0.0.8169922, VMW_bootbank_ ____net-e1000_8.0.3.1-5vmw.670.0.0.8169922, VMW_bootbank_ ____net-e1000e_3.2.2.1-2vmw.670.0.0.8169922, VMW_bootbank_ ____net-fcoe_1.0.29.9.3-7vmw.670.0.0.8169922, VMW_bootbank_ ____net-forcedeth_0.61-2vmw.670.0.0.8169922, VMW_bootbank_ ____net-igb_5.0.5.1.1-5vmw.670.0.0.8169922, VMW_bootbank_ ____net-libfcoe-92_1.0.24.9.4-8vmw.670.0.0.8169922, VMW_bootbank_ ____net-mlx4-core_1.9.7.0-1vmw.670.0.0.8169922, VMW_bootbank_ ____net-mlx4-en_1.9.7.0-1vmw.670.0.0.8169922, VMW_bootbank_ ____net-nx-nic_5.0.621-5vmw.670.0.0.8169922, VMW_bootbank_ ____net-tg3_3.131d.v60.4-2vmw.670.0.0.8169922, VMW_bootbank_ ____net-usbnet_1.0-3vmw.670.0.0.8169922, VMW_bootbank_ ____net-vmxnet3_1.1.3.0-3vmw.670.2.48.13006603, VMW_bootbank_ ____nhpsa_2.0.22-3vmw.670.1.28.10302608, VMW_bootbank_ ____nmlx4-core_3.17.13.1-1vmw.670.2.48.13006603, VMW_bootbank_ ____nmlx4-en_3.17.13.1-1vmw.670.2.48.13006603, VMW_bootbank_ ____nmlx4-rdma_3.17.13.1-1vmw.670.2.48.13006603, VMW_bootbank_ ____ntg3_4.1.3.2-1vmw.670.1.28.10302608, VMW_bootbank_ ____nvme_1.2.2.28-1vmw.670.3.73.14320388, VMW_bootbank_ ____nvmxnet3-ens_2.0.0.21-1vmw.670.0.0.8169922, VMW_bootbank_ ____nvmxnet3_2.0.0.29-1vmw.670.1.28.10302608, VMW_bootbank_ ____ohci-usb-ohci_1.0-3vmw.670.0.0.8169922, VMW_bootbank_ ____pvscsi_0.1-2vmw.670.0.0.8169922, VMW_bootbank_ ____qflge_1.1.0.11-1vmw.670.0.0.8169922, VMW_bootbank_ ____sata-ahci_3.0-26vmw.670.0.0.8169922, VMW_bootbank_ ____sata-ata-piix_2.12-10vmw.670.0.0.8169922, VMW_bootbank_ ____sata-sata-nv_3.5-4vmw.670.0.0.8169922, VMW_bootbank_ ____sata-sata-promise_2.12-3vmw.670.0.0.8169922, VMW_bootbank_ ____sata-sata-sil24_1.1-1vmw.670.0.0.8169922, VMW_bootbank_ ____sata-sata-sil_2.3-4vmw.670.0.0.8169922, VMW_bootbank_ ____sata-sata-svw_2.3-3vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-adp94xx_1.0.8.12-6vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-aic79xx_3.1-6vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-bnx2fc_1.78.78.v60.8-1vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-bnx2i_2.78.76.v60.8-1vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-fnic_1.5.0.45-3vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-hpsa_6.0.0.84-3vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-ips_7.12.05-4vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-iscsi-linux-92_1.0.0.2-3vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-libfc-92_1.0.40.9.3-5vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-megaraid-mbox_2.20.5.1-6vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-megaraid2_2.00.4-9vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-mpt2sas_19.00.00.00-2vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-mptsas_4.23.01.00-10vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-mptspi_4.23.01.00-10vmw.670.0.0.8169922, VMW_bootbank_ ____scsi-qla4xxx_5.01.03.2-7vmw.670.0.0.8169922, VMW_bootbank_ ____sfvmk_1.0.0.1003-6vmw.670.3.73.14320388, VMW_bootbank_ ____shim-iscsi-linux-9-2-1-0_6.7.0-0.0.8169922, VMW_bootbank_ ____shim-iscsi-linux-9-2-2-0_6.7.0-0.0.8169922, VMW_bootbank_ ____shim-libata-9-2-1-0_6.7.0-0.0.8169922,
...

 VMW_bootbank_ ____shim-libata-9-2-2-0_6.7.0-0.0.8169922, VMW_bootbank_ ____shim-libfc-9-2-1-0_6.7.0-0.0.8169922, VMW_bootbank_ ____shim-libfc-9-2-2-0_6.7.0-0.0.8169922, VMW_bootbank_ ____shim-libfcoe-9-2-1-0_6.7.0-0.0.8169922, VMW_bootbank_ ____shim-libfcoe-9-2-2-0_6.7.0-0.0.8169922, VMW_bootbank_ ____shim-vmklinux-9-2-1-0_6.7.0-0.0.8169922, VMW_bootbank_ ____shim-vmklinux-9-2-2-0_6.7.0-0.0.8169922, VMW_bootbank_ ____shim-vmklinux-9-2-3-0_6.7.0-0.0.8169922, VMW_bootbank_ ____smartpqi_1.0.1.553-28vmw.670.3.73.14320388, VMW_bootbank_ ____uhci-usb-uhci_1.0-3vmw.670.0.0.8169922, VMware_bootbank_ __vmware-esx-esxcli-nvme-plugin_1.2.0.36-2.48.13006603, VMware_bootbank_ __vsan_6.7.0-3.73.14263135, VMware_bootbank_ __vsanhealth_6.7.0-3.73.14263064, VMware_locker_tools-light_10.3.10.12406962-14141615
   VIBs Skipped: INT_bootbank_ __iavmd_2.7.2.1001-1OEM.700.1.0.15843807

Check the message it will show that update will be applied and a reboot required true, so you will be confirmed that we can update it .

There is a message that VIBs skipped, we can ignore it because we are not installing the new one and after VIBs, there may be less chance to revert and for the upgrade, we can skip it

  • Now we are sure that upgrade could be possible and run the command without the dry-run. Make sure to use the profile name which you have gotten from the first command
esxcli software profile update -d /vmfs/volumes/609abf69-1d682f78-0185-3cfdfee40d18/patch/VMware-ESXi-7.0.3d-19482537-Custom-Dell-4.2.2-a-depot.zip -p Dell-UCS-Addon-ESXi-70U3d-19482537_4.2.2-a
Update Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: CIS_bootbank_ __ucs-tool-esxi_1.2.2-1OEM, Dell_bootbank_ __nenic-ens_1.0.6.0-1OEM.700.1.0.15843807, Dell_bootbank_ __nenic_1.0.42.0-1OEM.670.0.0.8169922, Dell_bootbank_ __nfnic_4.0.0.87-1OEM.670.0.0.8169922, INT_bootbank_ ____i40en_2.2.7.0-1OEM.700.1.0.15843807, INT_bootbank_ ____iavmd_2.7.2.1001-1OEM.700.1.0.15843807, INT_bootbank_ ____igbn_1.9.1.0-1OEM.700.1.0.15843807, INT_bootbank_ ____ixgben_1.12.3.0-1OEM.700.1.0.15843807, MEL_bootbank_ ____nmlx5-core_4.21.71.101-1OEM.702.0.0.17630552, MEL_bootbank_ ____nmlx5-rdma_4.21.71.101-1OEM.702.0.0.17630552, QLC_bootbank_ ____qcnic_2.0.62.0-1OEM.700.1.0.15843807, QLC_bootbank_ ____qedentv_3.40.57.0-1OEM.700.1.0.15843807, QLC_bootbank_ ____qedf_2.2.86.0-1OEM.700.1.0.15843807, QLC_bootbank_ ____qedi_2.19.87.0-1OEM.700.1.0.15843807, QLC_bootbank_ ____qedrntv_3.40.56.0-1OEM.700.1.0.15843807, QLC_bootbank_ ____qfle3_1.4.25.0-1OEM.700.1.0.15843807, QLC_bootbank_ ____qfle3f_2.1.26.0-1OEM.700.1.0.15843807, QLC_bootbank_ ____qfle3i_2.1.9.0-1OEM.700.1.0.15843807, VMW_bootbank_ ____atlantic_1.0.3.0-8vmw.703.0.20.19193900, VMW_bootbank_ ____bnxtnet_216.0.50.0-41vmw.703.0.20.19193900, VMW_bootbank_ ____bnxtroce_216.0.58.0-23vmw.703.0.20.19193900, VMW_bootbank_ ____brcmfcoe_12.0.1500.2-3vmw.703.0.20.19193900, VMW_bootbank_ ____elxiscsi_12.0.1200.0-9vmw.703.0.20.19193900, VMW_bootbank_ ____elxnet_12.0.1250.0-5vmw.703.0.20.19193900, VMW_bootbank_ ____icen_1.4.1.7-1vmw.703.0.20.19193900, VMW_bootbank_ ____ionic-en_16.0.0-16vmw.703.0.20.19193900, VMW_bootbank_ ____irdman_1.3.1.20-1vmw.703.0.20.19193900, VMW_bootbank_ ____iser_1.1.0.1-1vmw.703.0.20.19193900, VMW_bootbank_ ____lpfc_14.0.169.25-5vmw.703.0.35.19482537, VMW_bootbank_ ____lpnic_11.4.62.0-1vmw.703.0.20.19193900, VMW_bootbank_ ____lsi-mr3_7.718.02.00-1vmw.703.0.20.19193900, VMW_bootbank_ ____lsi-msgpt2_20.00.06.00-4vmw.703.0.20.19193900, VMW_bootbank_ ____lsi-msgpt35_19.00.02.00-1vmw.703.0.20.19193900, VMW_bootbank_ ____lsi-msgpt3_17.00.12.00-1vmw.703.0.20.19193900, VMW_bootbank_ ____mtip32xx-native_3.9.8-1vmw.703.0.20.19193900, VMW_bootbank_ ____ne1000_0.8.4-11vmw.703.0.20.19193900, VMW_bootbank_ ____nhpsa_70.0051.0.100-4vmw.703.0.20.19193900, VMW_bootbank_ ____nmlx4-core_3.19.16.8-2vmw.703.0.20.19193900, VMW_bootbank_ ____nmlx4-en_3.19.16.8-2vmw.703.0.20.19193900, VMW_bootbank_ ____nmlx4-rdma_3.19.16.8-2vmw.703.0.20.19193900, VMW_bootbank_ ____ntg3_4.1.7.0-0vmw.703.0.20.19193900, VMW_bootbank_ ____nvme-pcie_1.2.3.16-1vmw.703.0.20.19193900, VMW_bootbank_ ____nvmerdma_1.0.3.5-1vmw.703.0.20.19193900, VMW_bootbank_ ____nvmetcp_1.0.0.1-1vmw.703.0.35.19482537, VMW_bootbank_ ____nvmxnet3-ens_2.0.0.22-1vmw.703.0.20.19193900, VMW_bootbank_ ____nvmxnet3_2.0.0.30-1vmw.703.0.20.19193900, VMW_bootbank_ ____pvscsi_0.1-4vmw.703.0.20.19193900, VMW_bootbank_ ____qflge_1.1.0.11-1vmw.703.0.20.19193900, VMW_bootbank_ ____rste_2.0.2.0088-7vmw.703.0.20.19193900, VMW_bootbank_ ____sfvmk_2.4.0.2010-6vmw.703.0.20.19193900, VMW_bootbank_ ____smartpqi_70.4149.0.5000-1vmw.703.0.20.19193900, VMW_bootbank_ ____vmkata_0.1-1vmw.703.0.20.19193900, VMW_bootbank_ ____vmkfcoe_1.0.0.2-1vmw.703.0.20.19193900, VMW_bootbank_ ____vmkusb_0.1-6vmw.703.0.20.19193900, VMW_bootbank_ ____vmw-ahci_2.0.11-1vmw.703.0.20.19193900, VMware_bootbank_ ____bmcal_7.0.3-0.35.19482537, VMware_bootbank_ ____cpu-microcode_7.0.3-0.35.19482537, VMware_bootbank_ ____crx_7.0.3-0.35.19482537, VMware_bootbank_ ____elx-esx-libelxima.so_12.0.1200.0-4vmw.703.0.20.19193900, VMware_bootbank_ ____esx-base_7.0.3-0.35.19482537, VMware_bootbank_ ____esx-dvfilter-generic-fastpath_7.0.3-0.35.19482537, VMware_bootbank_ ____esx-ui_1.36.0-18403931, VMware_bootbank_ ____esx-update_7.0.3-0.35.19482537, VMware_bootbank_ ____esx-xserver_7.0.3-0.35.19482537, VMware_bootbank_ ____esxio-combiner_7.0.3-0.35.19482537, VMware_bootbank_ ____gc_7.0.3-0.35.19482537, VMware_bootbank_ ____loadesx_7.0.3-0.35.19482537, VMware_bootbank_ ____lsuv2-hpv2-hpsa-plugin_1.0.0-3vmw.703.0.20.19193900, VMware_bootbank_ ____lsuv2-intelv2-nvme-vmd-plugin_2.7.2173-1vmw.703.0.20.19193900, VMware_bootbank_ ____lsuv2-lsiv2-drivers-plugin_1.0.0-10vmw.703.0.35.19482537, VMware_bootbank_ ____lsuv2-nvme-pcie-plugin_1.0.0-1vmw.703.0.20.19193900, VMware_bootbank_ ____lsuv2-oem-dell-plugin_1.0.0-1vmw.703.0.20.19193900, VMware_bootbank_ ____lsuv2-oem-hp-plugin_1.0.0-1vmw.703.0.20.19193900, VMware_bootbank_ ____lsuv2-oem-lenovo-plugin_1.0.0-1vmw.703.0.20.19193900, VMware_bootbank_ ____lsuv2-smartpqiv2-plugin_1.0.0-8vmw.703.0.20.19193900, VMware_bootbank_ ____native-misc-drivers_7.0.3-0.35.19482537, VMware_bootbank_ ____qlnativefc_4.1.14.0-26vmw.703.0.20.19193900, VMware_bootbank_ ____trx_7.0.3-0.35.19482537, VMware_bootbank_ ____vdfs_7.0.3-0.35.19482537, VMware_bootbank_ ____vmware-esx-esxcli-nvme-plugin_1.2.0.44-1vmw.703.0.20.19193900, VMware_bootbank_ ____vsan_7.0.3-0.35.19482537, VMware_bootbank_ ____vsanhealth_7.0.3-0.35.19482537, VMware_locker_tools-light_11.3.5.18557794-19482531
   VIBs Removed: Adaptec_Inc_bootbank_ __scsi-aacraid_6.0.6.2.1.54013-1OEM.600.0.0.2494585, Avago_bootbank_ __scsi-megaraid-sas_6.610.16.00-1OEM.600.0.0.2494585, CIS_bootbank_ __ucs-tool-esxi_1.1.0-1OEM, Dell_bootbank_ __nfnic_4.0.0.40-1OEM.670.0.0.8169922, EMU_bootbank_ __brcmfcoe_12.0.1115.0-1OEM.670.0.0.7535516, EMU_bootbank_ __elxiscsi_12.0.1188.0-1OEM.670.0.0.8169922, EMU_bootbank_ __elxnet_12.0.1115.0-1OEM.670.0.0.7535516, EMU_bootbank_ __lpfc_12.2.212.10-1OEM.670.0.0.8169922, INT_bootbank_ __igbn_1.4.7-1OEM.670.0.0.8169922, INT_bootbank_ __intel-nvme-vmd_1.8.0.1001-1OEM.670.0.0.8169922, INT_bootbank_ __ixgben_1.7.15-1OEM.670.0.0.8169922, INT_bootbank_ __net-i40e_2.0.7-1OEM.600.0.0.2494585, INT_bootbank_ __net-ixgbe_4.5.3-1OEM.600.0.0.2494585, MEL_bootbank_ __nmlx5-core_4.17.15.16-1OEM.670.0.0.8169922, MEL_bootbank_ __nmlx5-rdma_4.17.15.16-1OEM.670.0.0.8169922, QLC_bootbank_ __qcnic_1.0.26.0-1OEM.670.0.0.8169922, QLC_bootbank_ __qedentv_3.11.7.0-1OEM.670.0.0.8169922, QLC_bootbank_ __qedi_2.10.15.0-1OEM.670.0.0.8169922, QLC_bootbank_ __qedrntv_3.11.7.0-1OEM.670.0.0.8169922, QLC_bootbank_ __qfle3_1.0.86.0-1OEM.670.0.0.8169922, QLC_bootbank_ __qfle3f_1.0.68.0-1OEM.670.0.0.8169922, QLC_bootbank_ __qfle3i_1.0.23.0-1OEM.670.0.0.8169922, QLogic_bootbank_ __qlnativefc_3.1.16.0-1OEM.670.0.0.8169922, VMW_bootbank_ __ata-libata-92_3.00.9.2-16vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-amd_0.3.10-3vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-atiixp_0.4.6-4vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-cmd64x_0.2.5-3vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-hpt3x2n_0.3.4-3vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-pdc2027x_1.0-3vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-serverworks_0.4.3-3vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-sil680_0.4.8-3vmw.670.0.0.8169922, VMW_bootbank_ __ata-pata-via_0.3.3-2vmw.670.0.0.8169922, VMW_bootbank_ __block-cciss_3.6.14-10vmw.670.0.0.8169922, VMW_bootbank_ __bnxtnet_20.6.101.7-24vmw.670.3.73.14320388, VMW_bootbank_ __bnxtroce_20.6.101.0-20vmw.670.1.28.10302608, VMW_bootbank_ __char-random_1.0-3vmw.670.0.0.8169922, VMW_bootbank_ __ehci-ehci-hcd_1.0-4vmw.670.0.0.8169922, VMW_bootbank_ __hid-hid_1.0-3vmw.670.0.0.8169922, VMW_bootbank_ __i40en_1.8.1.9-2vmw.670.3.73.14320388, VMW_bootbank_ __ima-qla4xxx_2.02.18-1vmw.670.0.0.8169922, VMW_bootbank_ __ipmi-ipmi-devintf_39.1-5vmw.670.1.28.10302608, VMW_bootbank_ __ipmi-ipmi-msghandler_39.1-5vmw.670.1.28.10302608, VMW_bootbank_ __ipmi-ipmi-si-drv_39.1-5vmw.670.1.28.10302608, VMW_bootbank_ __iser_1.0.0.0-1vmw.670.1.28.10302608, VMW_bootbank_ __lpnic_11.4.59.0-1vmw.670.0.0.8169922, VMW_bootbank_ __lsi-mr3_7.708.07.00-3vmw.670.3.73.14320388, VMW_bootbank_ __lsi-msgpt2_20.00.06.00-2vmw.670.3.73.14320388, VMW_bootbank_ __lsi-msgpt35_09.00.00.00-5vmw.670.3.73.14320388, VMW_bootbank_ __lsi-msgpt3_17.00.02.00-1vmw.670.3.73.14320388, VMW_bootbank_ __misc-cnic-register_1.78.75.v60.7-1vmw.670.0.0.8169922, VMW_bootbank_ __misc-drivers_6.7.0-2.48.13006603, VMW_bootbank_ __mtip32xx-native_3.9.8-1vmw.670.1.28.10302608, VMW_bootbank_ __ne1000_0.8.4-2vmw.670.2.48.13006603, VMW_bootbank_ __nenic_1.0.29.0-1vmw.670.3.73.14320388, VMW_bootbank_ __net-bnx2_2.2.4f.v60.10-2vmw.670.0.0.8169922, VMW_bootbank_ __net-bnx2x_1.78.80.v60.12-2vmw.670.0.0.8169922, VMW_bootbank_ __net-cdc-ether_1.0-3vmw.670.0.0.8169922, VMW_bootbank_ __net-cnic_1.78.76.v60.13-2vmw.670.0.0.8169922, VMW_bootbank_ __net-e1000_8.0.3.1-5vmw.670.0.0.8169922, VMW_bootbank_ __net-e1000e_3.2.2.1-2vmw.670.0.0.8169922, VMW_bootbank_ __net-fcoe_1.0.29.9.3-7vmw.670.0.0.8169922, VMW_bootbank_ __net-forcedeth_0.61-2vmw.670.0.0.8169922, VMW_bootbank_ __net-igb_5.0.5.1.1-5vmw.670.0.0.8169922, VMW_bootbank_ __net-libfcoe-92_1.0.24.9.4-8vmw.670.0.0.8169922, VMW_bootbank_ __net-mlx4-core_1.9.7.0-1vmw.670.0.0.8169922, VMW_bootbank_ __net-mlx4-en_1.9.7.0-1vmw.670.0.0.8169922, VMW_bootbank_ __net-nx-nic_5.0.621-5vmw.670.0.0.8169922, VMW_bootbank_ __net-tg3_3.131d.v60.4-2vmw.670.0.0.8169922, VMW_bootbank_ __net-usbnet_1.0-3vmw.670.0.0.8169922, VMW_bootbank_ __net-vmxnet3_1.1.3.0-3vmw.670.2.48.13006603, VMW_bootbank_ __nhpsa_2.0.22-3vmw.670.1.28.10302608, VMW_bootbank_ __nmlx4-core_3.17.13.1-1vmw.670.2.48.13006603, VMW_bootbank_ __nmlx4-en_3.17.13.1-1vmw.670.2.48.13006603, VMW_bootbank_ __nmlx4-rdma_3.17.13.1-1vmw.670.2.48.13006603, VMW_bootbank_ __ntg3_4.1.3.2-1vmw.670.1.28.10302608, VMW_bootbank_ __nvme_1.2.2.28-1vmw.670.3.73.14320388, VMW_bootbank_ __nvmxnet3-ens_2.0.0.21-1vmw.670.0.0.8169922, VMW_bootbank_ __nvmxnet3_2.0.0.29-1vmw.670.1.28.10302608, VMW_bootbank_ __ohci-usb-ohci_1.0-3vmw.670.0.0.8169922, VMW_bootbank_ __pvscsi_0.1-2vmw.670.0.0.8169922, VMW_bootbank_ __qflge_1.1.0.11-1vmw.670.0.0.8169922, VMW_bootbank_ __sata-ahci_3.0-26vmw.670.0.0.8169922, VMW_bootbank_ __sata-ata-piix_2.12-10vmw.670.0.0.8169922, VMW_bootbank_ __sata-sata-nv_3.5-4vmw.670.0.0.8169922, VMW_bootbank_ __sata-sata-promise_2.12-3vmw.670.0.0.8169922, VMW_bootbank_ __sata-sata-sil24_1.1-1vmw.670.0.0.8169922, VMW_bootbank_ __sata-sata-sil_2.3-4vmw.670.0.0.8169922, VMW_bootbank_ __sata-sata-svw_2.3-3vmw.670.0.0.8169922, VMW_bootbank_ __scsi-adp94xx_1.0.8.12-6vmw.670.0.0.8169922, VMW_bootbank_ __scsi-aic79xx_3.1-6vmw.670.0.0.8169922, VMW_bootbank_ __scsi-bnx2fc_1.78.78.v60.8-1vmw.670.0.0.8169922, VMW_bootbank_ __scsi-bnx2i_2.78.76.v60.8-1vmw.670.0.0.8169922, VMW_bootbank_ __scsi-fnic_1.5.0.45-3vmw.670.0.0.8169922, VMW_bootbank_ __scsi-hpsa_6.0.0.84-3vmw.670.0.0.8169922, VMW_bootbank_ __scsi-ips_7.12.05-4vmw.670.0.0.8169922, VMW_bootbank_ __scsi-iscsi-linux-92_1.0.0.2-3vmw.670.0.0.8169922, VMW_bootbank_ __scsi-libfc-92_1.0.40.9.3-5vmw.670.0.0.8169922, VMW_bootbank_ __scsi-megaraid-mbox_2.20.5.1-6vmw.670.0.0.8169922, VMW_bootbank_ __scsi-megaraid2_2.00.4-9vmw.670.0.0.8169922, VMW_bootbank_ __scsi-mpt2sas_19.00.00.00-2vmw.670.0.0.8169922, VMW_bootbank_ __scsi-mptsas_4.23.01.00-10vmw.670.0.0.8169922, VMW_bootbank_ __scsi-mptspi_4.23.01.00-10vmw.670.0.0.8169922, VMW_bootbank_ __scsi-qla4xxx_5.01.03.2-7vmw.670.0.0.8169922, VMW_bootbank_ __sfvmk_1.0.0.1003-6vmw.670.3.73.14320388, VMW_bootbank_ __shim-iscsi-linux-9-2-1-0_6.7.0-0.0.8169922, VMW_bootbank_ __shim-iscsi-linux-9-2-2-0_6.7.0-0.0.8169922, VMW_bootbank_ __shim-libata-9-2-1-0_6.7.0-0.0.8169922, VMW_bootbank_ __shim-libata-9-2-2-0_6.7.0-0.0.8169922, VMW_bootbank_ __shim-libfc-9-2-1-0_6.7.0-0.0.8169922, VMW_bootbank_ __shim-libfc-9-2-2-0_6.7.0-0.0.8169922, VMW_bootbank_ __shim-libfcoe-9-2-1-0_6.7.0-0.0.8169922, VMW_bootbank_ __shim-libfcoe-9-2-2-0_6.7.0-0.0.8169922, VMW_bootbank_ __shim-vmklinux-9-2-1-0_6.7.0-0.0.8169922, VMW_bootbank_ __shim-vmklinux-9-2-2-0_6.7.0-0.0.8169922, VMW_bootbank_ __shim-vmklinux-9-2-3-0_6.7.0-0.0.8169922, VMW_bootbank_ __smartpqi_1.0.1.553-28vmw.670.3.73.14320388, VMW_bootbank_ __uhci-usb-uhci_1.0-3vmw.670.0.0.8169922,  VMware_bootbank_ __vsanhealth_6.7.0-3.73.14263064, 

.
.
.
VMware_locker_tools-light_10.3.10.12406962-14141615
   VIBs Skipped:INT_bootbank_ __iavmd_2.7.2.1001-1OEM.700.1.0.15843807

Check the message it should show “The update completed successfully”. Now you are 50% done now you can reboot the server to take the upgrade in effect it will take server boot time(3-5 min ) + 5-7 Min ESXi upgrade.

  • Reboot ESXi
#  reboot -f

After Update

Remove from Maintainance mode

esxcli system maintenanceMode set --enable=false

Log in to ESXi GUI and power on all VMs because due to the upgrade and maintenance mode auto power on option may not work so the first time after upgrading ESXi 6.7 to 7 update 3 we need to power on VMs manually.

Important Acronyms and Abbreviations

There are many but we have given what is required in our process.

VMVirtual Machine
VMFSVirtual Machine File System
VCLIvSphere Command Line Interface
VIBvSphere Installation Bundle
VCVirtual Center
VIMVirtual Infrastructure Management
P2VP2V Physical to Virtual
V2VVirtual to Virtual

VIB Update – Not required if Upgraded

If you have upgraded from the above procedure this is not required but if in case you need to upgrade via VIB update run the below command and reboot the server.

# esxcli software vib update --depot /vmfs/volumes/609abf69-1d682f78-0185-3cfdfee40d18/patch/VMware-ESXi-7.0.3d-19482537-Custom-Dell-4.2.2-a-depot.zip
# reboot -f 

Summary

We have after preparation for upgrading ESXi 6.7 to 7 update 3 via SSH and esxcli we need to run only three below command

esxcli software sources profile list -d /path_of_zip_file.zip

esxcli software profile update -d /path_of_zip_file.zip -p Profile_Name –dry-run

esxcli software profile update -d /path_of_zip_file.zip -p Profile_Name

Conclusion

We have learned how to upgrade Vmware ESXi 6.7 to VMware ESXi 7 U3 via SSH and esxcli command. Hope this article is useful for you. Share for care.

]]>
https://www.explinux.com/2023/01/upgrading-esxi-6-7-to-7-update-3.html/feed 0