Jumat, 30 Agustus 2024

How to Reset Raspberry Pi Password

How to Reset Raspberry Pi Password

Don't remember the password you set while installing Raspberry Pi OS? It happens.

Raspberry Pi OS is set to auto login and doesn't even need password while using sudo. Since you are hardly entering the password anywhere, it is only human that you'll forget it.

Resetting the Raspberry Pi OS password is not complicated. In this tutorial, I'll cover both cases where you can auto login and where you cannot login to your system.

Let's start with the first method.

Method 1: If you can auto login

Here's the deal: By default, Raspberry Pi OS is set to automatically log in to the system without requiring a password.

If that's the case, you are in luck. Raspberry Pi OS is configured to not ask for a password with sudo. Since you can log in automatically, and no password is required for sudo, resetting the password will be super easy.

You just have to type this in the terminal:

sudo passwd username

Here's an example where I changed the password for the main user named ushika:

How to Reset Raspberry Pi Password

Alternatively, you can use the GUI tool provided by

How to Reset Raspberry Pi Password

In here, under the System tab, you'll see the option to change the password.

How to Reset Raspberry Pi Password

Method 2: If you cannot auto login

This is slightly complicated and longer procedure. If you cannot log in to your Raspberry Pi OS, you can modify a few parameters to boot into the root shell and reset the password from there.

You need a separate computer, preferably running Linux here.

Step 1: Modify cmdline.txt file

Take out the micro SD card from the Pi and put it in your computer. On Linux, it should automatically mount. All you have to do is to edit the /boot/cmdline.txt file.

You can do it graphically or use the terminal; the choice is yours.

How to Reset Raspberry Pi Password

There should be one or more lines and you have to add init=/bin/sh at the end of this last line, NOT on a new line. There must be a space before init=/bin/sh.

Now, this last line should look like this.

console=serial0,115200 console=tty1 root=PARTUUID=585e914d-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=IN init=/bin/sh

Save the file and unmount the SD card.

Step 2: Boot Raspberry Pi into the root shell

Plug the modified SD card into the Pi again and power it on.

Now when you boot into the Pi, it will drop you into the root shell. In here, you can run commands as root and make changes to your system.

How to Reset Raspberry Pi Password

But for that, you have to remount the system with read-write access (you must type the command exactly):

mount -o remount, rw /

Now, change the password for the user:

passwd username

If you do not remember the username, you can run ls /home/ and it should show what users are there on your system.

Enter the new password twice and then use this command to make sure that the changes are saved to the disk:

sync
How to Reset Raspberry Pi Password

Everything seems to be set now. But you still have to revert the changes you made in cmdline.txt file otherwise you'll keep on booting into the root shell.

Use the command below to reboot into Raspberry Pi OS but temporarily bypassing the root shell:

exec /sbin/init

Once you are in your regular Raspberry Pi system, modify the cmdline.txt file again using this command:

sudo nano /boot/firmware/cmdline.txt
How to Reset Raspberry Pi Password
Revert the cmdline.txt changes you made earlier

Remove the init=/bin/sh and press Ctrl+X to save the changes.

Next time you boot, you'll normally boot into your system.

Conclusion

There could be a few other methods for resetting the Raspberry Pi password. I came across them in various forum discussions. However, I find these two the most reliable options.

I hope this tutorial helps you reset the password on your Raspberry Pi OS. Let me know if you have questions.



from It's FOSS https://ift.tt/QiC3DIp
via IFTTT

Rabu, 28 Agustus 2024

FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

Is BSD still relevant in the age when Linux dominates the servers? That's a matter of debate.

The reason I brought up BSD is the news that FreeBSD recently got a funding boost to improve its infrastructure. Relevant or not, it's good to see open source projects getting funding. Am I right?

💬 Let's see what else you get in this edition

  • A new Debian-based Linux distribution.
  • A Windows update breaking dual-booting for many.
  • Proton VPN finally introducing a new protocol for Linux.
  • And other Linux news, videos and, of course, memes!
  • This edition of FOSS Weekly is supported by ANY.RUN

✨ANY.RUN: Interactive Hunting against Linux Malware

Don’t give Bashlite (Gafgyt), Mirai, or DinodasRAT a chance to harm your Linux system.

ANY.RUN’s free sandbox lets you explore how Linux-targeting threats work, so that you detect and prevent infections from any suspicious files.

  1. Analyze files in real-time to detect threats instantly.
  2. Interact with malware safely without risking your system.
  3. Get detailed threat reports with IOCs to boost your defenses.

Start using ANY.RUN’s cloud sandbox with your business email today to keep your Linux system secure and your mind free from cybersecurity concerns.

Try it for FREE:

Interactive Online Malware Analysis Sandbox - ANY.RUN
Cloud-based malware analysis service. Take your information security to the next level. Analyze suspicious and malicious activities using our innovative tools.
FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

📰 Linux News


🧠 What We’re Thinking About

Can Fedora be considered better than Ubuntu?

A Simple Ubuntu Fail Made Me Want to Try Fedora: I Love it!
Ubuntu let me down after a simple change, and I’m here with Fedora.
FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

A clear case of how GenAI chatbots like Copilot can easily spread misinformation.

Microsoft Bing Copilot blames reporter for crimes he covered
Hallucinating AI models excel at defamation
FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

🧮 Linux Tips, Tutorials and More

Some essential tips and tweaks to take your KDE Konsole experience to the next level.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
It’s time to kustomize the KDE Konsole.
FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

Know your way around APT by following our detailed guide on it:

Using apt Commands in Linux [Ultimate Guide]
This guide shows you how to use apt commands in Linux with examples so that you can manage packages effectively.
FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

Running macOS on Linux is possible! But, you have to do it right.

I Installed macOS on Linux in a VM (for fun sake)
Installing macOS as a virtual machine in a Linux system? Well, let’s do it for the sake of some ‘virtual fun’
FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

📹 Videos we are creating


✨ Project Highlights

This open-source Android app can help you keep tabs on your data usage.

Data Monitor: The Sleek Open-Source Android App to Track Data Usage
How much data do you use on a daily/monthly basis? Data Monitor helps you track that.
FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

A “fresh” take on what a Debian-based Linux distro can be. 😉

RefreshOS: A Potential Debian-based Alternative to Kubuntu
It may not be too exciting, but it’s an alternative to exist. What do you think?
FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

🧩 New Quiz

How many of these 80s gadget icons can you guess correctly?

80s Nostalgic Gadgets
Remember the 80s? This quiz is for you :)
FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

💡 Quick Handy Tip

In Firefox, you can directly set an image from a website as the background on your PC.

To do that, first open an image in full screen by right-clicking on it and selecting “Open Image in New Tab”. Now, right-click on the image and then select “Set Image as Desktop Background…”.

FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

A word of caution: Avoid sourcing wallpapers from shady websites.


🤣 Meme of the Week

Linux makes working with old PCs a breeze. One cannot say the same for Windoze. 😝

FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

🗓️ Tech Trivia

FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

On August 25, 1991, Linus Torvalds posted a message that marked the beginning of Linux.


🧑‍🤝‍🧑 FOSSverse Corner

One of our regular FOSSers is facing issues with a laptop keyboard, many of our other FOSSers have already chimed in with some fascinating insights, go join them!

Keyboard problems with laptop running Linux Lite 6.4
Hi all, 👋 Seems I´ve run into some problems with my laptop (keyboard) as of late. 🙁 I´m running Linux Lite 6.4 on this laptop (Medion Akloya E6222). It´s been running fine until now. A few days ago our local electricity provider had to cut off power for a limited amount of time, so I disconnected the laptop from the mains beforehand. But it was still on battery of course. 2 days later I reconnected it to mains again and the laptop began charging. Nothing unusual…
FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

To mark the birthday of Linux, an interesting thread has gained traction in recent days.

Linux turns 33! What’s your Linux story?
I know this story was more suitable yesterday but I forgot to send the draft… 33 years ago, on 25th August 1991, Linux Torvalds made the announcement stating that he is making an OS as a “hobby”. And the same “hobby” is now being used by worlds top 500 supercomputers, the ISS and the entire internet! It is also being used by users like us, who just enjoy using linux and do some good work on it. So what’s your linux story? Let me share mine. I started using linux in March 2020. The first OS I…
FOSS Weekly #24.35: COSMIC Desktop, Refresh OS, Konsole Tips and More Linux Stuff

❤️ With love

Share it with your Linux-using friends and encourage them to subscribe (hint: it's here).

Share the articles in Linux Subreddits and community forums.

Follow us on Google News and stay updated in your News feed.

Opt for It's FOSS Plus membership and support us 🙏

Enjoy using Linux 😄



from It's FOSS https://ift.tt/rktFcpM
via IFTTT

Senin, 26 Agustus 2024

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal

KDE Plasma desktop comes with Konsole as the default terminal emulator.

It may seem like just another terminal application, but like KDE itself, Konsole is also highly customizable.

With the correct set of configurations, you can make Konsole the most beautiful and functional terminal ever.

Let me share some tips with you.

1. Open a location in Dolphin file manager

If you are currently working in a directory and want to open it in File Manager, first right-click anywhere in the terminal and select Open File Manager.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Open File Manager

You can open the folder in any other file manager installed on your system too. Just select that application from the Open Folder With option in the right-click context menu.

2. Search for text from the current terminal screen

I know you can rely on find and grep to look for text in the terminal. However, your terminal also features a find option to look for text on the terminal output.

In Konsole, click on the Find button.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Find Text with Options

Here, enter the text you want to find and then use the settings button to fine tune the search, as shown in the screenshot above.

Use the up and down arrow to navigate between search results.

3. Managing multiple tabs

These days, most terminal emulators allow you to create multiple tabs. But Konsole sets an entirely new level for terminal tab management. Let's see some examples.

You can open new tabs by clicking on the New Tab button on the top panel of Konsole.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Click on the New Tab Button

Once a tab is created, you can just double-click on the tab bar to create new terminal tabs on the go.

To edit a tab property, right-click on top of a tab and select Configure or Rename Tab. In the new settings window, you can insert items to the tab title by using the Insert button:

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Insert Tab Title bar item

You can also change the color of the tab by using the Tab Color drop-down.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Colored Tabs and Title Bar Details

4. Split the terminal window

Have you heard about Tmux? Or Screen perhaps? Tmux, Screen, etc. are terminal multiplexers that let you work on multiple commands and sessions from a single terminal window. But these need a learning curve.

If you are a casual user who just wants to use two panes of terminal, Konsole has got your back.

On most of the KDE Plasma desktop installations, Konsole has this split window feature pinned on the top bar. Click on it and select a split direction.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Select a Split

Konsole supports multiple splits, and the below screenshot shows a three split Konsole layout, with the window control details.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Split View
💡
The "Load a new tab with axb layout” will create a new tab with the selected splits like 2x2.

5. Save entire terminal output to a file

The redirection operator works for the command that is being run at the moment. What if you want to save everything on the terminal screen to a file?

On Konsole, click on the top-right hamburger menu and select Save Output As.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Save output to a file

Name the file and click on Save to save the output to a text file.

💡
You can also use the shortcut CTRL + SHIFT + S to save the output to a file.

6. Search what an output means on the web

Did you get an error while running a command? There is no need to copy and then paste to a browser to search for that error.

Select the text on the terminal that you need to search on the web. Right-click on top of it and then select Search For... From the list, select either DDG or Google (default items).

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Terminal Output Meaning on the Web

This will search for the selected text using the selected search engine on your default browser.

7. Read-only terminal

Sometimes, it is good to make a terminal session read-only to avoid accidental inputs. In Konsole, right-click on any empty place in a terminal session and select Read Only from the context menu.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Read-only Terminal

Now, the session will be read only and until you disable the read-only mode through the same step, the session stays so.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Terminal Session is Read-only

8. Using Quick Commands

Do you use a particular command repeatedly? Say if you are constantly editing a script file. Here, set the command to edit that file into Quick commands so that it is easily accessible.

First, click on the Menu button and select Plugins → Show Quick Commands.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Enable Quick commands in Konsole

This will open a left-side panel with fields to add a new command. Click on Add to start creating a new Quick Command.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Click on Add Button

Fill in the necessary fields. For example, I have added a shortcut to edit my Starship Prompt config.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Edit Quick Commands
📋
If you install shellcheck package, you can get warnings for possible errors with your commands. But I was unable to add source command to a quick command.

Now, once saved, you can access this command by pressing CTRL+ALT+G and then selecting from the list.

0:00
/0:22

Access quick commands from the list

9. Create a new Profile

Profiles are a very efficient way to be more productive and more ordered in general. In Konsole, profiles can do much more than just defaulting a particular shell/command to a profile.

🚧
Konsole comes with a preset profile. You MUST NOT modify this profile. For any modification, you should create a new profile and do not tamper with the default.

To create a new profile, click on the top-right hamburger menu and select Create a new profile.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Create a New Profile

Here, as a simple new profile, you can set several things as noted below.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
General Tab of Profile Creation Window
  • Name: Give a catchy name for each profile to distinguish between their purpose.
  • Command: By default, it points to bash in most distros. If you have any other shell installed, use it instead. First, find the location of the executable of the command and enter it here. E.g. /usr/bin/zsh for ZSH shell. It is not necessary for this to be a shell. In fact, you can use any command here.
  • Initial Directory: Home directory of the current user is the default. If you are using a particular directory frequently, paste the path of that directory here. So, when this profile is opened, you will be in that directory by default.

This is more than enough for a simple user profile.

All the profiles, including newly created ones are available to see in the Konsole configuration window, accessed via Hamburger Menu → Settings → Configure Konsole → Profiles.

You can edit profiles from here.

10. Change the appearance

Who does not want an awesome-looking terminal? When it comes to KDE Plasma, it's all about appearance kustomizations!

The appearance of a terminal window is done through profiles. As in the previous step, create a profile using Menu → Create a New Profile. Or edit and existing user created profile.

In that window, use the “Appearance” tab and click on the New button to create a new color scheme.

💡
In this tab, use the Choose button adjacent to Font to change the font and font size
13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Appearance Settings Page
🚧
By default, there are several themes or color schemes available in Konsole. If you are not satisfied with those, create a new and avoid editing existing ones.

In the color scheme settings window, you can make several visual changes, such as:

  • Change color of different aspects of terminal text and background.
  • Blur the background.
  • Change the transparency of the terminal window.
  • Apply a background image to the terminal window.
13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Color Scheme Settings

Here is the resulting appearance of the terminal.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Konsole Appearance Settings Applied

11. Change the scrolling settings

At times, you will notice that you cannot scroll back after a certain point in the terminal. So, whatever appears on the very top will be inaccessible to you.

You can change this scenario by setting the scroll back in Konsole. On the profile settings, go to the Scrolling tab and set the Fixed Size value to 10000. By default, its value is set to 1000.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Scrolling Settings
🚧
The Scrollback data is saved to RAM. Therefore, you should never change the Scrollback to Unlimited or set a very high value. It may be temporarily convenient, but will cause RAM shortage issues in limited resource systems.

I suggest you go through the other options in this Scrolling section as well.

12. Open files in Dolphin from the terminal

When you list files in a directory, it will be highly beneficial, if you get an option to open it in the preferred app. Konsole can give you that!

In the Profile settings window, go to the Mouse section and then select the Miscellaneous section.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Toggle the “Underline Files” checkbox

Here, check the Underline Files checkbox and apply the settings.

At this point, when you hover over a file (including directories), those will be underlined. Other than that, the directories give a small thumbnail too!

You can press CTRL and click on any file to open it in the preferred app. Or open a directory in Dolphin.

💡
The same feature can be obtained in ls command using the --hyperlink option.
🚧
There are other settings in the miscellaneous tab like Open files by direct click, Allow escape sequences for links, etc. I won't suggest a common user to enable these. These can lead to easily opening unwanted files or malicious links.

Drag and Drop Files

If you disable the “Disable drag & drop menu for files & URLs” checkbox, Konsole will give you a small context menu when you drag and drop a file to the Konsole window. This context menu can be used to move that file to pwd, copy it to pwd, create a link there or paste the location of the file to terminal.

Show file thumbnails on hover

If you go to the Top Right Hamburger menu and Settings → Configure Konsole → Thumbnails, you can enable thumbnail generation.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Set thumbnail settings

Here set an activation key other than you just mouse hover and save. Now, when you hover over images, you will get a neat small thumbnail of that image.

0:00
/0:16

Get image thumbnail in Konsole

13. Configure the Toolbar

Toolbar items can be very useful for terminal starters. Here, we will place several useful buttons on the toolbar that you can access easily, without the need to remember keyboard shortcuts and commands.

To edit the toolbar, you can go to the Menu → Settings → Configure Toolbar.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Select Configure Toolbar

Essential Toolbar items

To place an item on the toolbar, either drag and drop or click on that item in the left pane and then click the right-arrow button.

0:00
/0:32

Arranging the toolbar buttons.

You can click on the item in the right pane and then click on the left arrow to remove it from the toolbar.

💡
By default, there will be a Find, Menu Button, items in the toolbar. It is recommended to not remove these items.

Now, the following items can be added for a better experience.

  • Read-only: For quickly making a terminal session read-only.
  • Interrupt Task (INT): This is the SIGINT signal. In simpler terms, this is what happens when you press CTRL + C to interrupt a task.
  • Save Output as: To quickly save the output on the screen to a file.
  • Separator and Expanded Separator: To align the items as needed.
  • Split view from Left/Right and Split View from Top-Bottom: This is a personal choice as, I use only the session toolbar and hide the main toolbar (in the next step).

Change the Toolbar position

It is not essential to place the toolbar at the top. You can make it appear on the bottom, left, and right side as well.

First, right-click on the toolbar and disable the Lock Toolbar Position from the list.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Disable Lock toolbar position

You can see some vertical bars or handles appearing on the toolbar. Once more, right-click on the toolbar and select Orientation → Bottom.

Here, you can either show the main toolbar or hide it by unchecking the Main toolbar from Toolbars shown.

Once done with the positioning, lock the toolbar similar to how we unlocked. Right-click on the toolbar (now bottom) and check the Lock Toolbar Position checkbox.

Here's how our terminal will look.

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Terminal with changed toolbar

Here is my daily terminal setup:

13 Tips and Tweaks to Get More Out of KDE Konsole Terminal
Customized KDE Plasma terminal

There is more...

Like KDE, there is no end to customization here. A few more tweaks that I can remember are:

  • By default, when you hover over a color in HEX form, Konsole will preview that color.
  • You can add locations as bookmarks by using CTRL+SHIFT+B.
  • You can open Konsole Handbook with important help articles by pressing the F1 key.

I understand that many of these terminal customization options are available in other emulators but Konsole seems to have the most of them. That's my guess.

If you like the Konsole customization tips, perhaps you would also like Dolphin file manager tweaks.

💬 Did you find some useful tweaks in this tutorial? Share it in the comment section please.



from It's FOSS https://ift.tt/dGaSft1
via IFTTT