I have a black screen on my PC, and I've somehow got in the terminal the terminal is all black and I can only do commands.

Is there a command to factory reset your PC through the terminal?

share|improve this question
2  
Looks like you are encountering the xy problem: meta.stackexchange.com/questions/66377/what-is-the-xy-proble‌​m Isn't your main problem the black screen? If yes then you should ask about how to fix the black screen, because you might find very simple (maybe just 1 command) answers. – Tooniis Aug 14 '17 at 7:40
up vote 11 down vote accepted

Try this:

Log in as root

exec sudo -i

Try configuring unconfigured packages:

dpkg --configure -a

Update the contents of the repositories

apt-get update

Try to fix missing dependencies:

apt-get -f install

Update your system:

apt-get dist-upgrade

Reinstall Ubuntu desktop:

apt-get install --reinstall ubuntu-desktop

Remove unnecessary packages:

apt-get autoremove

Delete downloaded packages already installed:

apt-get clean

Reboot the system to see if the issue was resolved:

reboot
share|improve this answer
    
everyone is saying that there is no way to reset. then what does these commands do? – Waseem Ahmad Naeem Jul 30 '17 at 15:09
    
@WaseemAhmadNaeem: Restore system and graphical environment to initial configuration (factory reset PC thru the terminal) – kyodake Jul 31 '17 at 0:43
    
why use exec sudo -i, just sudo -i enough @kyodake – solfish Aug 14 '17 at 8:14
    
@solfish: exec replace the shell with the program executed, not as new process. – kyodake Aug 14 '17 at 23:29

There is no such thing as factory reset in ubuntu. You have to run a live disk/usb drive of any linux distro and backup your data and then reinstall ubuntu.

share|improve this answer

This blog talks about a software which can reset Ubuntu to factory default

I have not tried, but definitely worth a peek

http://www.omgubuntu.co.uk/2017/03/reset-ubuntu-desktop-default-settings

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.