Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to repair the damaged Ubuntu system

2025-03-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to repair the damaged Ubuntu system". In the daily operation, I believe that many people have doubts about how to repair the damaged Ubuntu system. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "how to repair the damaged Ubuntu system". Next, please follow the editor to study!

Today, I am upgrading my Ubuntu 18.04LTS system. Unfortunately, the power is off and the system shuts down while updating the Ubuntu. When the power is restored, I start the system again. After entering the password on the login page, it becomes blank and does not respond. The keyboard and mouse don't work either. All I see is a blank screen! Fortunately, it is only a testing machine, and there is no important data. I can just erase the entire system and reinstall it. However, I do not want to do so. Since I had nothing to lose, I just wanted not to reinstall and repair my broken Ubuntu system, and I succeeded! If you find yourself in a situation like mine, don't panic. This short tutorial describes how to easily repair a damaged Ubuntu system without losing data without reinstalling it.

Repair damaged Ubuntu system

First, try logging in using live cd and backing up the data on an external drive. In case this method doesn't work, you can still get the data and reinstall the system!

On the login page, press CTRL+ALT+F1 to switch to tty1. You can learn more about switching between TTY here.

Now, enter the following commands one by one to repair the damaged Ubuntu Linux.

$sudo rm / var/lib/apt/lists/lock$ sudo rm / var/lib/dpkg/lock$ sudo rm / var/lib/dpkg/lock-frontend$ sudo dpkg-- configure-a $sudo apt clean$ sudo apt update-- fix-missing$ sudo apt install-f $sudo dpkg-- configure-a $sudo apt upgrade$ sudo apt dist-upgrade

*, restart the system using the command:

$sudo reboot

You can now log in to your Ubuntu system as usual.

After I finished these steps, all the data in my Ubuntu 18.04 test system was still there, and everything was the same as before.

At this point, the study on "how to repair the damaged Ubuntu system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report