How toTech

How to Change Linux Password?

Linux is a free and open source software operating system which was initially released in 1991. Although Linux is operating on the open source software system it is a great competitor for the Windows operating system. The Windows runs on the closed source operating system unlike the Linux which is an open source one. The advantage of this open sourcing system is that anyone can change/contribute to the internal Kernel. In Linux you can setup a password for your files and accounts. To change the passwords in case if you want a change or you have lost your passwords you can simply use some special commands. In this article we will get to know about how to change Linux password.

Linux has been the base to learn any software operating system. Linux UI has always been based on the command line operating systems and has extended this to the Graphical user interface. In the Linux you can change your password by using a few commands as it is the most effective command line OS. You can either change your password and you can also change the passwords of other users if you are an Administrator. Linux provides with users the most security enhancements as it is an open source software. Unlike the Windows, the virus files do not work in the Linux operating system. With Linux being open-source, several distributions are available to the end-user. Debian, Fedora, Ubuntu and Mint are just a few of the distributions available to end users, and these distributions are completely free to download.

Change Linux Password

You can change your Linux password through various sources. Generally you can change your Linux password through the terminal. We will go through the several ways of changing your Linux password. Scroll down below to explore.

We will go through how to change your Linux password through the Terminal and also how to change your Linux root password with and without the current root password.

A) Change Linux password through Terminal

For most of the Linux systems you can use this method to change your Linux password. It might be confusing for some who are unfamiliar with the Linux operating system. Follow the below steps to change your Linux password through the terminal. This method is similar to changing your Linux password by knowing your current root password.

Linux Password

  1. Open a Terminal Window

    If you are using a desktop environment open the Terminal Window. Or you can use the shortcut keys CTRL+ALT+T to get access to your terminal window. Open the Linux terminal window

  2. Type the password command

    In the terminal window type in the passwd command and press enter. Type in the password command

  3. Enter your OLD password/Current password

    You will be needed to enter your Old/current password. The terminal will not display your password. So the onlookers cannot see your password and also the length of your password. Enter your current password

  4. Enter your New password

    After entering your old password, now you need to enter the new password. Enter it twice to confirm it. Then press Enter to see a message stating that you have successfully updated your password. Enter your new password twice

  5. Type EXIT and press Enter

    Once you see a password updated successfully message, type exit and press enter to save your changes and exit from the terminal window. Enter the Exit command to save and exit

B) Change Linux password without the current Root password

You can also change your Linux password even if you have not known your current Root password. Follow the below illustrated steps and know how to do so.

1)Restart your computer

Restart your computer

2) Press E at the Grub Menu
Tap and hold the E key while your computer is at the blink of restart. The grub menu is generally when the computer is ready to restart. If just stays for a second or two.

Enter E key at the Grub menu

3) Scroll to linux/boot
In the window appeared, scroll down to the line that starts with linux/boot. You can use the up and down arrow keys to navigate up and down.

Linux command line

4) Move to end of the line and enter this command
Use the side navigation arrows to move to the end of the line and then enter init=/bin/bash after ro. The end of the line now looks like ro init=/bin/bash.

Linux command line

5) Press CTRL+X
Now press the CTRL+X command to boot directly to a root level command prompt in a single user mode.

CTRL+X

6) Type mount-o remount,rw/ at the prompt and press enter.
This mounts the file system in read-write mode.

Mount command

7) Type the password command
Type the passwd command and press enter.

Enter the password

8) Enter a new root password
Now, type in a new root passwrod and press enter. Retype the password to confirm it. As usually, the characters you type won’t enter on the screen.

Enter new password

9) Type reboot-f and the press Enter
This command therefore reboots the system normally. Hence you have changed your Linux password with and without knowing the current root password.

Reboot F

Windows v/s Linux

Let’s go through some top 3 comparisons between the Windows and Linux operating systems.

Windows

  1. In windows every user does not have access to the source code. Only a few selected group can have access to it.
  2. Windows has very few customization options available.
  3. In windows the command line is available but we need to go to Run and enter CMD to run it.

Linux

  1. In Linux the user has access to the Kernel and can alter the code according to his need. The bugs in this OS can be fixed at rapid pace.
  2. Linux has various distributions which are highly customizable.
  3. In Linux command line is a very useful tool for administration.

Hence those are some top 3 comparisons between Windows and Linux. For any queries in relation to the Windows operating system visit the links quoted below.

Read: How to Install Windows 10 using USB/CD
How to format Windows without USB/CD

FAQ’s

Here are some top 3 FAQ’s in regard to the Linux operating system. We’ve handpicked for you these FAQ’s to clear up any doubts in your mind if any in regard to the Linux OS.

How do I change a user password in UBUNTU

1) Open the Ubuntu command line. We need to use the Ubuntu command line, the Terminal, in order to change the sudo password. …
2) Log in as root user. Only a root user can change his/her own password.
3) Change the sudo password through the passwd command.
4) Exit the root login and then the Terminal.

Which Linux is best for beginners

1) Ubuntu. If you’ve researched Linux on the internet, it’s highly probable that you have come across Ubuntu
2) Linux Mint Cinnamon. Linux Mint is the number one Linux distribution
3) Distrowatch
4) Zorin OS
5) Elementary OS
6) Linux Mint Mate
7) Manjaro Linux

Which Linux version is best for Laptops

1) Zorin OS. Zorin Linux OS is a Ubuntu based distro which provides a Windows OS like graphical user interface for the newcomers
2) Deepin Linux
3) Lubuntu
4) Linux Mint Cinnamon
5) Ubuntu MATE

To conclude: Hence through this article, we have learnt the different methods to change your Linux password. Comment your views below in the comment section and do share the content. For some more of interesting and tech articles visit Morphigo.com and delve into some amazing and cool article content on web.

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close