After I removed an app with purge, I cannot use sudo or apt-get any more and get this error.   -bash: /usr/bin/sudo: No such file or directory   Do you have any suggestions?   version: Ubuntu 16.04
This seems to be a chicken-egg problem. The most common task using sudo is installing and removing software.  sudo apt-get purge &lt;appname&gt;   But sudo itself can be removed.  sudo apt-get purge sudo # Do not run this command on production computers!   This is where the fun comes  ubuntu@ubuntu:~$ sudo bash: /usr/bin/sudo: No such file or directory   Although it's obvious that no person in his right mind will purge sudo (other than me), someone can be fooled to run this command (not directly, in its hex mode, or whatever it's called) or a person could SSH in disguised as tech guru and do the mess.  So is there a way of reinstalling sudo?
How to design a command inquiring internally required packages? How to change Blender's default startup settings? How can I change Blender from the default cube/lamp/camera default setup? Also, is it possible to change other features, such as the default view direction (Top, Side, etc) or the Editor type (3D View, Node Editor, Graph Editor, etc)? How should ambiguous tags be dealt with? If tag "foo" refers to two or more different technologies or concepts is it better to retag the less common usages or is it better to add additional tags to disambiguate?  My particular issue is with the  tag which mostly refers to the  but could also refer to the  programming language &amp; software platform. Is it better to retag the Curl language questions as  (any other suggestions?) or add some other tag such as "language"? When is the Killing form null? How to get current CPU and RAM usage in Python? What's your preferred way of getting current system status (current CPU, RAM, free disk space, etc.) in Python? Bonus points for *nix and Windows platforms.  There seems to be a few possible ways of extracting that from my search:   Using a library such as  (that currently seems not actively developed and not supported on multiple platform) or something like  (again no activity since 2007 it seems and no support for Windows). Using platform specific code such as using a os.popen("ps") or similar for the *nix systems and MEMORYSTATUS in ctypes.windll.kernel32 (see ) for the Windows platform. One could put a Python class together with all those code snippets.   It's not that those methods are bad but is there already a well-supported, multi-platform way of doing the same thing? How to circumvent using an out parameter in an anonymous method block? The following method does not compile. Visual Studio warns "An out parameter may not be used within an anonymous method". The WithReaderLock(Proc action) method takes a delegate void Proc().  public Boolean TryGetValue(TKey key, out TValue value) {     Boolean got = false;     WithReaderLock(delegate     {         got = dictionary.TryGetValue(key, out value);     });     return got; }   What's the best way to get this behavior? (Please refrain from providing advice on threadsafe dictionaries, this question is intended to solve the out parameter problem in general). Tsunami dampening mechanisms Encouraged by the zeitgeist let me ask the following:  Is it feasible (now or in the future) to build systems a certain distance of a vulnerable coastline which can serve to dampen a tsunami before it reaches the coast itself?  The following picture comes to mind. We have some device which is small enough to be mounted on a buoy. An array of such buoys can be anchored some distance off the coastline, controlled by computers which are linked into the global tsunami warning network. This setup is quite feasible given what a cell phone can do today.  On the detection of an oceanic earthquake or other tsunami generating event (such as a piece of the Rock of Gibraltar falling into the sea) and given present environmental conditions one can calculate the expected path of the tsunami and its intensity. If a TDS (Tsunami Dampening System) of the type I describe above happens to be deployed in range of the tsunami, all relevant information is conveyed to the TDS controllers by the global tsunami warning system. All this happen in a matter of moments.  This leaves plenty of time (25min - 2hr) for the devices in the TDS array to be activated and to do their job. The question in this case would be - what form could such devices take? Perhaps mini-turbines which could dissipate the incoming energy into the ocean by first converting it to electrical energy.  Any such undertaking involves physical estimates for the size and shape of such an array, the precise capabilities of each device, etc. Many of these concerns involve simple physical questions.  Can you come up with the details of such a system or alternatively outline your own design? If you think that this idea would never work in the first place - for technological, physical or some other reasons - please explain what you think would be the prime obstacle and why? icons missing from libreoffice toolbars New Ubuntu 16.04.2 installation.  Uninstalled the default libreoffice installation. Then I installed libreoffice 5.4.0.3 from this PPA:  sudo add-apt-repository ppa:libreoffice/ppa   Now all icons are missing from toolbars:    Is this a bug or a funk setting? Any thoughts on how to reset the toolbar to get the typical configuration? I already tried the basic stuff (rebooting, disable/enable toolbars, etc.) When working with an image in Photoshop, I'd like to have a simple keyboard shortcut, like in , that automatically does:   Export > Export As or Export > Save For Web  Resize to biggest dimension = 600px (either width or height) Add suffix _600.jpg to filename   How to do that?  I'm not sure how to edit a recorded macro to do that (add the suffix and choose 600px for the biggest dimension).  Example: you open myphoto.png, you press F6 and then you automatically get myphoto_600.jpg. Static posts page with home.php For my website, I am using a static home page page Home (template front-page.php) and for posts- page News (template home.php)  I need to show all the post titles and exceprts on that page News (templ. home.php), but also show the original title and the_content from that page News itself.  This code below while statement shows all the posts, which is good, but the top the_title also shows the title from the first post, not from the News page itself.  How to achieve what I need?  &lt;?php get_header(); ?&gt;      &lt;?php     the_title();           the_content();     ?&gt;  &lt;?php if(have_posts()) while(have_posts()) : the_post(); ?&gt;          &lt;?php         the_title();         ?&gt;          &lt;?php         the_content();         ?&gt;      &lt;?php     endwhile;     ?&gt;    &lt;?php get_footer(); ?&gt; In .NET, which loop runs faster, 'for' or 'foreach'? Seeking English term for relationship between two members of extended family? Extracting embedded images from a PDF Execute program from within a C program How should I run another program from within my C program? I need to be able to write data into STDIN of the launched program (and maybe read from it's STDOUT)  I am not sure if this is a standard C function. I need the solution that should work under Linux. Limit of $\lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{\sqrt {n^2 +i} }$ Why do all the planets of the solar system orbit in roughly the same 2D plane? Most images you see of the solar system are 2D and all planets orbit in the same plane. In a 3D view, are really all planets orbiting in similar planes? Is there a reason for this? I'd expect that the orbits distributed all around the sun, in 3D. Has an object made by man (a probe) ever left the Solar System? How do I run a 'sudo' command inside a script? To do a patch manually I must type this command   sudo ./playback_delete_data_patch.sh 09_delete_old_data_p.sql     There is a space just before the 09:   sudo ./playback_delete_data_patch.sh [space] 09_delete_old_data_p.sql   How can I run this inside a script?  There are also several other commands but this one is giving trouble. How to store and preserve lots of data? I have many DVDs with movies and games, they are getting old and dusty, some of them are damaged. And I have more than 300 GB of general files in my PC. I want to store and preserve all of my data and keep them for a long long time.  I want to know what is the best and more reliable storage media that I should use and... I can buy. I will copy all of my DVDs to a new media and throw all of my DVDs away. It will take a very smaller physical space.  I think that everything that I need to store is currently 800 GB.  I do not like optical discs, because they are fragile and I have lost many CDs and DVDs. Hard drives would be good, but they can suddenly stop working, and it is very expensive to recover data from a broken hard drive.  Other questions: How often will I have to copy the files to a new storage media? Is it good idea to have another copy of each file stored in another storage media?  Edit: If I put all of the movies and games in a HDD, if the HDD stops working, I will lose everything. This is how valuable they are for me: If I lose 10% of them, I will not cry, because I can get new ones, but if I lose 90%, it will be a disaster.  Edit 2: I do not think that that online storage is reliable even if I pay for it, because they may be closed or may get bankrupt. They are not from my country and it would be difficult to get the files back. Acne underneath skin Introduction  Okay, I've almost won my war. The battle, its almost won... However, I must still claim victory in my final battle. The battle against the little enemies, the ones that have fought with my blade of benzoyl peroxide every single day.  Problem  Through spot treatments I have been able to fell every single one of these spots, but only the ones on my face. I've been using a spot treatment with benzoyl peroxide in, which has worked really well for me. However, my issue comes here:     There are spots underneath my skin, I think. The areas where they come through are a bit red.   So, because there is still slightly red skin on my face, and I think this is causing my acne to constantly return. I need to stop this, and end my war once and for all.  What I've tried   Washing my face with a rag and sponge every day, three times a day Changing my pillow case every day Using a benzoyl peroxide spot treatment Minimizing how much I touch my face Not interfering with the spots with my fingers, not picking at them, not playing with them. Just letting spot creams eradicate them.   Conclusion  Seriously, this driving me up the wall. I spot cream in the evening, by the time tomorrow has ended and its time for a shower, they've all come back. Its like they're coming in waves, damn waves! I must put an end to this.  So, how can I prevent acne from coming back within the space of a single school day? How can I get rid of these once and for all? What types of measures could I try? I have no reason to visit my doctor, its only acne, but I have no idea what I can try now.  Is there even a point in me trying? I acknowledge that I am a teenager, but no others that I know seem to have acne/spots like I do. Numbering of appendices in the backmatter of a book I'm using the standard book class. If I write  \documentclass{book}  \begin{document}  \frontmatter \tableofcontents  \mainmatter \chapter{foo} \section{Donald}  \backmatter \chapter{bar} \section{Mickey}  \end{document}   I expect to have chapter bar numbered as appendix A and section Mickey as A.1. Instead chapter bar is not numbered and section Mickey is 1.2, following section Donald. If I insert the appendix command to obtain  \documentclass{book}  \begin{document}  \frontmatter \tableofcontents  \mainmatter \chapter{foo} \section{Donald}  \backmatter \appendix \chapter{bar} \section{Mickey}  \end{document}   then chapter bar is unnumbered and section Mickey is numbered as .1.  What am I doing wrong?