One of the things you will probably run into while using PowerShell is to determine what version you are using. There are several different ways you can determine the version. Below are a couple of the most popular ways.
Method One: $PSVersionTable
Open a PowerShell command window and enter the below code statement.
$PSVersionTable
Below is an example of a result from $PSVersionTable
Method Two: Get-Host
Open a PowerShell command window and enter the below code statement.
You might be managing one server or hundreds of servers. One task that always comes up is to verify what version of Linux you are currently running. The easiest and quickest way I have found to check this is below.
Open up SSH session or a terminal session.
Run following command to determine the version you are on.
lsb_release -d
3. Example Output.
4. In this example you can see that we are running Ubuntu version 19.10.
One of the tasks you might be trying to complete is upgrading Debian 9 to Debian 10. There are still several data centers that are only offering Debian 9 as an option. Below are the following commands to upgrade the Linux operating system.
1. Open ans SSH session to the server or command terminal. 2. Log into the server. 3. Use SU to become root if you are not already a root user. (We are using root as the example user, this could be any user that has su permissions)
su root
4. Update and upgrade all packages for Debian 9 Stretch. To do this run the the below two commands.
apt update
apt upgrade
5. Reboot the system.
shutdown -r now
6. Open SSH session to the server or command terminal. Switch user to root by following step 3 again. 7. Update repo from Debian 9 Stretch to Debian 10 Buster
sed -i 's/stretch/buster/g' /etc/apt/sources.list
8. Update system to flush out the old ache and load the existing cache that was updated in step 7.
apt update
9. Upgrade Debian 9 Stretch to Debian 10 Buster.
apt upgrade
10. During the upgrade process you will be asked if you are you want to restart services during the upgrade without asking. You can select YES so the upgrade can be completed.
Example of what the upgrade process looks like after selecting yes.
11. When the upgrade is complete run the following command to clean up anything that might have been missed during the first upgrade process.
apt dist-upgrade
12. Remove old packages to insure you have a clean system after the upgrade.
apt autoremove
13. Reboot the system (otptional).
shutdown -r now
14. Check to insure the version is Debian 10 Buster. Open SSH terminal or terminal window and run the following command.
There are several different methods you can use to find your IP address on the Linux operating system. I find the below method the quickest and easiest method.
Steps 1. Open a SSH session to the server or open up a terminal window. 2. Enter the below command.
ip address
Sample Output
192.168.1.172 is the IP address of the server in this example.
Additional Information
You can also use the short version of the command which is listed below.
Recent Comments