Linux (Ubuntu 12.10) starts up, but the main menu on the left side, and the pictograms at the upper right corner, do not show up Linux OS (Ubuntu 12.10) starts up (user login, my personal picture of a beautiful Norwegian fjord-landscape fills the background), but the main menu on the left side, and the pictograms (battery state etc.) at the upper right corner of the screen, do not show up.
This occurred yesterday quite suddenly after six or seven weeks working with Ubuntu 12.10. Then I started in recovery mode and performed a file system check (fsck) but that takes hours and finally a message ¨Sorry Ubuntu has experienced an internal error etc¨ appeared.
How can I determine what has gone wrong and eventually, how can I solve it? So that I can work again using Ubuntu 12.10 (on a dual-boot system, Intel i7, ASUS P8P67 motherboard).

[SOLVED] choose the (opensource) X.Org X server (Nouveau display driver) in System settings -> Software sources -> Extra drivers. I'm not sure whether this has caused the problem, but after reboot, it worked for me.


Unable to find Apache version I am trying to find the version of Apache that is installed on my server. I'm currently using Ubuntu 14.04.5. I have two different issues that keep occurring. When I run apache2 -v I get the error command not found. No matter what I do I can't get around this error. Trying to find the directory doesn't work either, as I get a no such file or directory found error. Any help would be greatly appreciated.

Installed: (none) means that there is no Apache installed on your server. You can install it with the following command:

sudo apt install apache2

In your case the first thing, you have to make sure that apache is install or not
so
Run which apache2 to find the location of Apache. If it gives no output, then you don't have apache2 installed.
or you can check in
sudo /etc/init.d/apache2 start
You can also check using this command:
apt list --installed |grep apache2

if none of them works then you have to install apache or tell us what makes you think that apache is installed in your system


Ubuntu 12.04 on Vm Player showing Wired Network Instead of Wireless Network I am new to Ubuntu, recently I installed ubuntu 12.04 in Vm Player (Virtual Machine) on my Dell laptop having windows 7 ultimate 32 bit for just to check the security of my wireless network and want to crack the WiFi (WPA-PSK) password but in ubuntu it does not show the wireless network it shows the 2 arrow sign as i have not connect the ethernet cable to my laptop and connected through WiFi on my main OS (windows 7) but it shows the wired network and internet is working but it does not show wifi connection. On windows 7 WiFi is connected and showing the WiFi connection and working correctly.But my main motive is to crack the WiFi password as it can't detect WiFi network so what to do?  Please Help.!!thanks

My Laptop Specification :

Laptop       :  Dell Latitude D620

OS           :  Windows 7 Ultimate 32 bit

Processor    :  Core Duo 2 T7200 @ 2Ghz

Ram          :  2 GB

WiFi card    :  Intel Pro/Wireless 3945 ABG

Virtual
 Machine      :  Vm Player V 5.0.1

If Need to Install Drivers Please Give Me Full Information how to install and which driver I should install. Thanks In Advance.

From within the perspective of a virtual machine, you'll see the virtualized (emulated) hardware, not your real hardware. The hypervisor (VMware player in your case) will emulate a whole machine in which your Ubuntu installation is running. Specifically, VMware emulates a new network device (you can see that in Windows device manager) and will route traffic on IP-level, or bridge on Ethernet-level. It won't pass the whole device.

You have several options to gain access to your wireless hardware in Ubuntu:

Install Ubuntu (native) on your machine. Any way will be sufficient: Wubi install, dual boot, or on an external hard drive.
Run Ubuntu from the Live CD. This limits you from receiving possibly needed updates, and you'll loose all changes on every reboot.
Using a passthrough technology like Intel VT-d which allows you to redirect all low-level hardware calls to a virtual machine. This will make the hardware unavailable in your host operating system. However, your hardware does not support this, and that's why I don't recommend you to try this.
Find a USB Wireless card and use USB redirection with that device instead. I'm not sure if that's available in VMware Player, but if it is, this is possible without specific hardware support.

try reinstalling the network manager: sudo apt-get install --reinstall network-manager


apt-get issues, Python-related packages not fully installed or removed Any time I try to install a package or upgrade using apt-get, I get the error below.

root@localhost# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 0 B/610 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up python-wheel (0.29.0-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-wheel (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: error processing package ipython (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Setting up python-configparser (3.3.0r2-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-configparser (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-pip (8.1.2-2ubuntu0.1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-pip (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 python-wheel
 ipython
 python-configparser
 python-pip
E: Sub-process /usr/bin/dpkg returned an error code (1)

This answer for another question, solved the problem I was having.

The root cause of the problems is a corrupted Python package, trying to reinstall the packages with the following commands:

sudo apt-get clean
sudo apt-get update
sudo apt-get install -f --reinstall libpython2.7-minimal python-configparser

Try running following to correct package issues:

sudo apt-get check;sudo apt-get autoremove;sudo apt-get autoclean;

Also running following to update & upgrade:

sudo apt-get update && sudo apt-get upgrade


Trouble running VirtualBox on Ubuntu I want to run VirtualBox on Ubuntu, it used to work a while ago but I can't remember when or why. However when I double-click on an OS to run, it tries to start - opens a window for the virtual OS, gives the "host key" message, but then 5 seconds later closes the OS window and gives this error:

Failed to load VMMR0.ro (VERR_SUPLIB_OWNER_NOT_ROOT)

Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
Console
Interface:
IConsole {1968b7d3-e3bf-4ceb-99e0-cb7c913317bb}

If I run it with sudo virtualbox I still get the same problem. I've tried sudo apt-get purge virtualbox then sudo apt-get install virtualbox. I notice during the re-installation I get this amongst all the other output on the console:

Setting up virtualbox (4.1.12-dfsg-2ubuntu0.1) ...
 * Stopping VirtualBox kernel modules                                    [ OK ]
 * Starting VirtualBox kernel modules
 * No suitable module for running kernel found                           [fail]

Any ideas?

Solved the problem on my Ubuntu 12.04 install

sudo apt-get purge virtualbox
sudo apt-get install build-essential linux-headers-`uname -r`
sudo dpkg -i ~/download_folder/virtualbox-4.2_4.2.12-84980~Ubuntu~precise_i386.deb

You can get the .deb files here

This pretty much did it for me!

/etc/init.d/virtualbox start is trying to find a module vboxdrv for your current kernel... (/lib/modules/`uname -r` -name "vboxdrv.*). Please install linux-headers and try start again...


Can Microsoft Office Programs be opened by default instead of Libre Office? Folks. I finally convinced my sister to drop Windows at her small business and go Ubuntu. She complained, though, that she does not want to use Libre Office and is willing to use Microsoft Office instead. I was like, ok, but then...

Then, she asked:
- Libre office is the default, right?
- Right.
- So, if someone gives me a document, by default it will open on Libre Office. Can you make it open on Microsoft Office by default instead?

So, even if I get it working via Wine, can I do what she requested or is it an impossible task?

This should be possible. In the WINE FAQ they address passing argument lists to windows programs via the command-line. Essentially you use the same command-line syntax as Windows but you prefix it with wine
# In Windows
C:\>winword filename

# In Ubuntu
$ wine winword filename

In Ubuntu, there are two files that control the default programs. (source)

~/.local/share/applications/mimeapps.list
/usr/share/applications/defaults.list

each of those has the format mime-type=shortcut.desktop so you can just plug in the mime type of a word document and then create a launcher that opens office. The mime types of all the office documents are here

For installing microsoft word in linux you will have to first install wine by :

  sudo apt-get install wine1.4

It is a software that will convert windows binary to linux's binary. In short you will be able to install windows applications in linux.

To open any file with it, type :

  wine winword filename

But if you are new to command - line and want to do it the GUI way, then open microsoft office and then open up the file that you want.

To enter commands you will have to open up terminal window.


Firefox update fails; "Could not get lock" error when I run sudo apt upgrade I am new to Ubuntu. I have installed Ubuntu MATE in my p.c. Now when I opened browser Mozilla Firefox it searched for a update. So I have been updating it but it fails every time.

sudo apt update works well.

sudo apt upgrade throws this error:

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

How can I update all the applications in Ubuntu MATE as well as Mozilla Firefox?

Use this with care, i.e. make sure not other installation/upgrade is running in parallel.

You can try sudo rm /var/lib/dpkg/lock.

It should remove the lock and allow for upgrade.

Edit:

To check whether any other installation is running, try

ps -ef | grep apt

ps -ef | grep dpkg

and see if any processes are listed, if same are present, check if any other open terminal is running any installation.

Hope it helps.


Do I need a swap partition? I have 4GB of RAM and I want to install Ubuntu. Do I need a to have a swap partition? Because my computer has 4GB RAM, I do not think it is necessary to have a swap partition. If I do need to have a swap partition, should it be a 4GB or an 8GB partition?

Whether you need swap space or not depends on the number and type of applications that you run.  I have a desktop system with 6 GB of RAM and no swap configured.  99.9% of the time that works fine for me.  Performance is good and I can run many concurrent applications.  However I can recall at least two times when my system slowed to the point where it became totally unresponsive due to excessive memory use.  In one of those cases I was able to bring up a console window and kill one of the big memory using tasks.  In another case I could not even do that and my only choice was to pull the plug on the system, losing everything that was in progress.

We don't know whether your usage patterns are like mine however, if I were doing it again, I would have configured some swap space.

In my case, 8 GB total would have been adequate.  Unless you are greatly strapped for disk space, I therefore recommend that you dedicate 4 GB for swap.  8 GB won't hurt you but is less important if you can use the disk space for more important things.

If you are using a HDD it's not good to use a swap partition since HDDs are very slow and you have 4 gb ram than you don't need one .


How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE? I want to install Oracle's JRE and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?

Before release Java 7, I followed this way to install Java 6.

But it doesn't work for Java 7. There is no package sun-java7-xxx. How can you install Java 7?

There is a similar answer on how to install JRE 7.

Install Java JDK

The manual way

Download the 32-bit or 64-bit Linux "compressed binary file" - it has a ".tar.gz" file extension.
Uncompress it

tar -xvf jdk-8-linux-i586.tar.gz   (32-bit)

tar -xvf jdk-8-linux-x64.tar.gz   (64-bit)

The JDK 8 package is extracted into ./jdk1.8.0 directory. N.B.: Check carefully this folder name since Oracle seem to change this occasionally with each update.
Now move the JDK 8 directory to /usr/lib

sudo mkdir -p /usr/lib/jvm
sudo mv ./jdk1.8.0 /usr/lib/jvm/

Now run

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0/bin/javaws" 1

This will assign Oracle JDK a priority of 1, which means that installing other JDKs will replace it as the default. Be sure to use a higher priority if you want Oracle JDK to remain the default.
Correct the file ownership and the permissions of the executables:

sudo chmod a+x /usr/bin/java
sudo chmod a+x /usr/bin/javac
sudo chmod a+x /usr/bin/javaws
sudo chown -R root:root /usr/lib/jvm/jdk1.8.0

N.B.: Remember - Java JDK has many more executables that you can similarly install as above. java, javac, javaws are probably the most frequently required. This answer lists the other executables available.
Run

sudo update-alternatives --config java

You will see output similar to the one below - choose the number of jdk1.8.0 - for example 3 in this list (unless you have have never installed Java installed in your computer in which case a sentence saying "There is nothing to configure" will appear):

$ sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
* 2            /usr/lib/jvm/jdk1.7.0/bin/java                   1         manual mode
  3            /usr/lib/jvm/jdk1.8.0/bin/java                   1         manual mode

Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/lib/jvm/jdk1.8.0/bin/java to provide /usr/bin/java (java) in manual mode

Repeat the above for:

sudo update-alternatives --config javac
sudo update-alternatives --config javaws

Note for NetBeans users!

You need to set the new JDK as default editing the configuration file.

If you want to enable the Mozilla Firefox plugin:

32 bit:
ln -s /usr/lib/jvm/jdk1.8.0/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/

64 bit:
ln -s /usr/lib/jvm/jdk1.8.0/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

N.B.: You can link the plugin (libnpjp2.so) to /usr/lib/firefox/plugins/ for a system-wide installation (/usr/lib/firefox-addons/plugins from 15.04 onwards). For Ubuntu 13.10, the path to the plugin directory is /usr/lib/firefox/browser/plugins/.

Depending on your configuration, you might need to update the apparmor profile for Firefox (or other browsers) in /etc/apparmor.d/abstractions/ubuntu-browsers.d/java:

# Replace the two lines:
#  /usr/lib/jvm/java-*-sun-1.*/jre/bin/java{,_vm} cx -> browser_java,
#  /usr/lib/jvm/java-*-sun-1.*/jre/lib/*/libnp*.so cx -> browser_java,
# with those (or adapt to your new jdk folder name)
/usr/lib/jvm/jdk*/jre/bin/java{,_vm} cx -> browser_java,
/usr/lib/jvm/jdk*/jre/lib/*/libnp*.so cx -> browser_java,

Then restart apparmor:

sudo /etc/init.d/apparmor restart

The easy way (Obsolete)

  Note: WebUpd8 team's PPA has been discontinued with effective from April 16, 2019. Thus this PPA doesn't have any Java files. More information can be found on PPA's page on Launchpad. Hence this method no longer works and exists because of hostorical reasons.

The easiest way to install the JDK 7 is to do it with the Web Up8 Oracle Java OOS. However, it is believed that this PPA is sometimes out of date. Also note the dangers of using a PPA.

This installs JDK 7 (which includes Java JDK, JRE and the Java browser plugin):

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
# or if you want JDK 8:
# sudo apt-get install oracle-java8-installer
# these commands install Oracle JDK7/8 and set them as default VMs automatically:
# sudo apt-get install oracle-java7-set-default
# sudo apt-get install oracle-java8-set-default

Source

N.B.: Before someone screams this is against the Oracle redistribution license - the PPA does not actually have Java in the personal repository. Instead, the PPA directly downloads from Oracle and installs it.

The Script way

If you're on a fresh installation of Ubuntu with no previous Java installations, this script automates the process outlined above if you don't want to type all that into a console. Remember, you still need to download Java from Oracle's website -- Oracle's links are not wget friendly.

Before using this make sure that this script is in the same directory as the .tar.gz file extension that you downloaded and there are no files that start with jdk-7 in the same folder. If there are, please move them out of the folder temporarily. Remember to make the script executable (chmod +x <script's file>).

#!/bin/sh

tar -xvf jdk-7*
sudo mkdir /usr/lib/jvm
sudo mv ./jdk1.7* /usr/lib/jvm/jdk1.7.0
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
sudo chmod a+x /usr/bin/java
sudo chmod a+x /usr/bin/javac
sudo chmod a+x /usr/bin/javaws

If you want to install the plugin for Firefox then add this to the end of the script:

mkdir ~/.mozilla/plugins
ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
sudo /etc/init.d/apparmor restart

Check if installation was successful

You can check if the installation succeeded with the following command:

java -version

You should see something like

java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

You can check if the JRE Mozilla plugin has been successful by using the official oracle website.

For Java 6: How do I install Oracle JDK 6?

OS: Ubuntu 18.04 LTS

I am surprised no one has mentioned conda . Link:
https://docs.conda.io/en/latest/miniconda.html

I installed java in one of my conda environments and used the java command without problems.


Append text to file names which do not contain a dot Given the following files:

english_api
english_overview
style.css

I want to get:

english_api.html
english_overview.html
style.css

In other words how to append a text to all files that do Not Contain a dot (.) within a directory using terminal.

Obviously there is a lot of files in that folder; I just  wrote 3 as an example.

If I were to, lets say, replace .css with .html in that folder, I would use:

rename .css .html *.css

But I cannot really think of a way to match files that do not contain something. Also how to append (vs replace) using rename command?

Try this find command,

find . -type f ! -name "*.*" -exec mv {} {}.html \;

It renames the files which doesn't contain dots in their filenames present in the current directory to this filename.htmlformat(added .html at the last).

.              --> Represents current directory

-type f        --> To do this operation only on files.

! -name "*.*" --> print the name of the files which doesn't have dots in their name.

-exec mv {} {}.html  --> find command perform this move(or)rename operation on the extracted filenames.

\;   -->  Represents the end of find command.

The answers are perfect , i also give you another command that do this job :

ls -1 | grep -v "\." | awk '{print "mv "$0" "$0".html"}' | sh

Some explanation :

ls - list directory contents

 -1     list one file per line

grep prints the matching lines.

-v, --invert-match
              Invert the sense of matching, to select non-matching lines.  (-v
              is specified by POSIX.)

Awk is mostly used for pattern scanning and processing. It searches one or more files to see if they contain lines that matches with the specified patterns and then perform associated actions.

NOTE :

I try your scenario and the command make the job .


How to uninstall ChromeOS and install Ubuntu on a chromebook Ive looked at many similar questions but none of them work.

Using Crouton on the Chromebook worked for a while but not any more. I have to reinstall Crouton every time I want to use Ubuntu so now I want to make the entire system work right off of Ubuntu without running ChromeOS.

I am using the Lenovo Thinkpad Yoga 11e Chromebook. I heard you have to take out some screw but I do not see where that would do anything. I've taken this thing apart many times but I did not see this red screw.

Can you tell me in detail where the screw is and tell me the rest of the steps needed to boot Ubuntu as the OS. I already have Ubuntu 16.04 on a USB drive that I know works because I've used it many times.

I am not sure on that particular model of chromebook. I just went through the hassle of uninstalling chromeOS from my Asus c202s. Things you should provide if you want better help: Model number of chromebook and CPU Architecture. There are plenty of ways to wipe chromeOS from your machine. Each machine is unique and requires a little different process. But here is a good start for you. You need to look up how to remove the "jumper screw". But you can also just look at the mobo, you should see a screw/ screwhole on the mobo with two copper semi circles on either side of the screw. This is the jumper, the screw head shorts the two copper pads. After you have disabled write protection, you will need to go into dev mode. Once in dev mode I would go this route; install a new bios, preferably a UEFI bios but if you cannot find one that works with your machine then you can try looking for a Legacy bios.

UEFI bios

Legacy bios

After your new bios is installed you can then boot from USB.

Don't Brick, Good luck.

Step one: Plug in your USB.
Step two: There should be a button you can use during startup to open BIOS. Open BIOS.
Step three: Go through the settings, somewhere there should be startup order. Set your USB to top priority.
Step four: Ubuntu should boot up. Go to the desktop and click on the install icon.
Step five: Follow the install process.
I hope this helps, it's my first time using this to answer.


How can I repair bootable USB drive? I have made an USB Drive, as live USB. But I am unable to boot from it. It has all required files. Assuming I don't have original ISO, how can I attempt to make it bootable again?

First, if the USB stick is not booting, I recommend erasing the whole USB stick and remake it again.

Download pendrivelinux or UNetbootin to create the Live USB again.  The program will automatically wipe all the stuff on the USB stick and copy the files from the Ubuntu iso to the USB stick (and remember to download the iso from the Ubuntu site.)

If it doesn't boot, and it shows the purple screen before the computer blacks out, try changing the boot options.

Tap F6 when you reach the purple screen.

Try nolapic and nomodset first.  Try all other options of the options mentioned didn't work.  Use  ↑ and ↓ to switch options and press Enter to choose the option.

If the computer boots, you are done, not really.  After you installed ubuntu, read this thread on the Ubuntu Forums and jump to the "How to permanently set kernel boot options on an installed OS (not wubi)" part to apply the boot option permanently.

If the USB stick still won't boot, read My computer boots to a black screen, what options do I have to fix it? to find the cause of not booting.


Grant group traversal rights on a folder I have a folder named Dog with these permissions:

dr--r-- 2 rich boys 4096

What is the shell command for it

The command is:
chmod g+x Dog

For opening the folder, you need the execute permission. (When used on regular files, the same execute permission allows running them.) This command simply sets it to the group without touching other permissions.
Further reading

man chmod (see also How can I get help on terminal commands?)

To give all rights (read, write and execute) to the owner and group; and no rights to others, run this command:

sudo chmod -R 750 ./Dog

Example:

cd /tmp
mkdir Dog
ll | grep Dog
    drwxr--r--  2 subroot subroot  4096 Mar 28 13:49 Dog/
sudo chmod -R 750 ./Dog
ll | grep Dog
    drwxrw----  2 subroot subroot  4096 Mar 28 13:49 Dog/


How can I accept the Microsoft EULA agreement for ttf-mscorefonts-installer? After a recent update, ttf-mscorefonts-installer prompted me to accept its license agreement.

 ┌─────────────────┤ Configuring ttf-mscorefonts-installer ├─────────────────┐
 │                                                                           │
 │ TrueType core fonts for the Web EULA
 │
 │ END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE
 │
 │ IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement
 │ ("EULA") is a legal agreement between you (either an individual or a
 │ single entity) and Microsoft Corporation for the Microsoft software
 │ accompanying this EULA, which includes computer software and may include
 │ associated media, printed materials, and "on-line" or electronic
 │ documentation ("SOFTWARE PRODUCT" or "SOFTWARE"). By exercising your
 │ rights to make and use copies of the SOFTWARE PRODUCT, you agree to be
 │ bound by the terms of this EULA. If you do not agree to the terms of
 │ this EULA, you may not use the SOFTWARE PRODUCT.
 │
 │                                  <Ok>
 │                                                                           │
 └───────────────────────────────────────────────────────────────────────────┘

Screenshot:

For some reason my terminal will not allow me to accept, or for some reason I am pressing the wrong hotkey...  I've tried every letter on the keyboard and Enter among others...  I'm sure there is a very simple and obvious solution to this.

I've also just tried to remove the package completely however the terminal states that due to the package not being correctly installed, I should reinstall the package before removing it.  Very frustrating!  Essentially, because I cannot successfully install this package, I can't really ever upgrade my system because I always have to end up terminating the terminal with the license agreement (thus the upgrade fails).

It's  ⇆ TAB , then return ↵.

:-)

In general, to navigate ncurses-style menus:

Use the Tab key to move from one element (e.g., button, text box) to the next. Use Shift+Tab to move in reverse.
Use Spacebar to "click" the selected button.
Use Enter to click the default button (or currently selected button, if there is no default).
You can move up and down in a textbox with the arrow keys, and with Page Up and Page Down. If that doesn't work, press Tab until the text box you want to navigate in is selected.

If you've accidentally said you don't agree to the EULA, and you want a chance to review it again and agree, you can reinstall ttf-mscorefonts-installer, purging its global configuration files:

sudo apt-get --purge --reinstall install ttf-mscorefonts-installer

Try hitting ➜ (The right arrow key). Then use the arrow keys to navigate and enter (That's return) for selecting an option.


Showing error on battery state I am a newbie to Linux and I am using Ubuntu 10.10 on one of my systems. When I am trying to open it, it is showing something like "checking battery state" and it is not responding to any keys or anything. Can any one tell me how to solve it? I changed the CMOS battery but it didn't work for me.

This is known bug that affects HP, Compaq, Dell and other manufactures. This is because of a change made in gnome-power-manager where by the estimate is done on time remaining, rather than percentage. This change does not play nice with some hardware and is why you are seeing (estimaing...) constantly.

The bug report about it is here if you fancy a read: https://bugs.launchpad.net/ubuntu/maverick/+source/gnome-power-manager/+bug/629258

At this time, I believe there is no fix available. However you can click on the estimating... and it will bring up a more detailed view of your battery info, which will display the percentage of charge.

(this information may be dated somewhat should be relevant)

try to change your bios settings, some graphic cards have windows specific bios settings. Disable the option in the bios. Mine name something like "optimus" or something


Lubuntu 14.04 Wifi on Laptop with Broadcom BCM4322 I'm preparing for a trip where I can't bring my desktop, so I recently broke out my trusty old laptop (Dell Latitude E4300) to get it ready for the trip. Previously, I had Ubuntu 12.04 LTS on the machine and there were no problems with wifi or the computer in general. My original problem came when I tried to upgrade to Ubuntu 14.04, which failed halfway through and long story short: I couldn't get it to work. I then installed Lubuntu 14.04 (It's a moderately old laptop and I had never tried Lubuntu, so why not) and it's going great, except, I can't connect to my wifi and since this will be my only method of access on my vacation, I really need to fix it. I'm kinda at a cross roads since I've never had this problem with this laptop. Any help would be great.

The output of "lspci -nvn | grep -i net"
Says the wifi card is a "Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b] (rev 01)"

I have looked at many other similar questions, but they're all very old and none have helped. Sorry if you guys get this a lot.

EDIT: Here is the link to the requested diagnostics (See comment by user "wild man"_
http://pastebin.ubuntu.com/7700888/

Please temporarily connect the ethernet and with a working connection, do:

sudo apt-get install linux-firmware-nonfree

Reboot. If it is not working, post the entirety of the wireless script again.

EDIT: Jul 18 '17: As is the case with many answers here, this and most answers that are three or more years old are probably obsolete. In fact, today the correct package is firmware-b43-installer. There is no need to update and research Broadcom questions however, as the link in the duplicate is updated regularly as needed.

There's nothing wrong with 12.04.

If you had no issues with it go to http://cdimage.ubuntu.com/ and download a 12.04 ISO and install it.


Is it possible to install Android's .apk file? Was just wondering it would be nice to have a convenient way of installing android's .apk apps in Ubuntu somehow.

Somebody has a clue about it?

The only way to run Android apps in Ubuntu (as far as I'm aware) is to install Android SDK, create a virtual Android device, use the SDK's tools to install the .apk file on that device and run the app inside the device.

Android developer portal has a lot of info on the subject.

its actually not possible to run the APK file on an Ubuntu PC as Ubuntu will not be able to read it. The best among many things is to install an Android virtual machine and run the APK.


WinUSB install error Installation failed! Exit code: 512 I am unable to solve this problem, I'm using Ubuntu 14.04. I already tried as root, and I still have not had success.

WinUSB reports this error:

Installation failed!
Exit code: 512
Log:
Formatting device...
Mounting...
mount: block device /home/flavio/Área de Trabalho/windows xp sp3 sata.iso is write-protected, mounting read-only
Copying...
Installing grub...
Installing for x86_64-efi platform.
grub-install: error: /media/winusb_target_1405019929_19723 doesn't look like an EFI partition.
.
Error occurred!
Syncing...
/usr/bin/winusb: line 78:  5376 Terminated               while true; do
    sleep 0.05; echo 'pulse';
done
Cleaning...
/usr/bin/winusb: line 78:  6975 Terminated               while true; do
    sleep 0.05; echo 'pulse';
done
Umounting and removing '/media/winusb_iso_1405019929_19723'...
Umounting and removing '/media/winusb_target_1405019929_19723'...

The problem here is with the method used to install GRUB. It has nothing to do with the current filesystem on thumbdrive as WinUSB formats it.

To fix it you must edit the winusb script which is located in /usr/bin. Open it with any text editor with root permissions (e.g. gksu gedit /usr/bin/winusb). Now search for grub-install in that file (it may be on line 401 - 402) and change that line so it looks like this:

grub-install --target=i386-pc --boot-directory="$partitionMountPath/boot" "$device"

Save the script. Install the package grub-pc-bin as follows:

sudo apt-get install grub-pc-bin

Now, try again to use WinUSB.

WinUSB only creates MBR bootable USB drives. If you want to install Windows in EFI mode a different method should be used.

I also wrote about this on my website.

Copy the iso file to some other location (Destop or home directory).  After that format the usb pendrive to FAT32 filesystem using gparted partition Editor.

Remove the pendrive and then re-insert it.

It will automatically get mounted, then run winusb application.

Select the copied iso file and create a bootable windows flash drive.


Paint Tool Sai pressure sensitivity doesn't work Alright.  Here's the situation; I've got my Ubuntu up and running, and it's generally working very nicely.  Winetricks in particular is making the transfer quite easy, as the programs that I couldn't easily replace seem to operate largely without a hitch.

Unfortunately, one of the programs I couldn't get working quite right is a digital illustration program called Paint Tool Sai.  It opens fine and the functions are all present... except the pressure sensitivity.  I suspect it's more than likely that SAI doesn't know how to interpret the native Wacom drivers.  My Paint appears to be lacking in some useful features that are part of my workflow, and GiMP hasn't impressed me much as a tool for illustration; if possible I'd prefer to use this particular program.

As of current, I was considering installing the Bamboo drivers into winetricks, but I'm not in any way certain that this is sound.  Is this a feasible solution to this issue, or should I try another workaround?

I know it's an old question, but since the issue is still not solved by Wine, people will probably be still googling what to do, so...

I've asked people at PlayOnLinux to make a special Wine build with the fixed pen pressure issue. So, what you need to do is:

install PlayOnLinux
go to Tools->Manage Wine Versions and install the version named "1.5.5-SAI"
go to File->Install->Install a non-listed program and install SAI
in PlayOnLinux, select SAI, click Configure, then under Wine Version, select 1.5.5-SAI
in PlayOnLinux, select SAI again, click Open the directory, open file misc.ini, change TabletMouseSimulation = 0 to TabletMouseSimulation = 1 (otherwise the pen will twitch about on it's own)
in PlayOnLinux, select SAI and click play :) Pen pressure should work now.

Hope this helps :)

http://wiki.winehq.org/TabletSupport should be having most up to date information


Cannot run Stardew Valley with PlayOnLinux I'm using Ubuntu 15.10 and I just bought Stardew Valley via GOG and used the installer with PlayOnLinux to install it. It said the install went perfectly. I ran it and got this error:

No suitable graphics card found.
Could not find a Direct3D device that supports the XNA Framework HiDef profile.
Verify that a suitable graphics device is installed.
Make sure that the desktop is not locked, and that no other application is running in full screen mode.
Avoid running under Remote Desktop or as a Windows Service.

I've got Intel Integrated Graphics 3000. I've tried this solution, but still got the same error. What do I do?

If it just isn't possible to run it on Linux, could you direct me to a thread to install Windows alongside Ubuntu (ubuntu installed first).

Thank you for your help.

Or you could wait for it to get ported. According to this Gaming on Linux article, OS X and Linux are top priorities now.

You could do 2 things:

Wait for the game to get ported to linux
Or
Download the game for Windows and run it with wine. Install wine with the command "sudo apt-get install wine"


See configured rules even when inactive I'm wondering if it's possible to get UFW to list the configured firewall rules even when it's not enabled. I only have ssh access to the server at this time, and I don't want to enable UFW if there's not a rule configured allowing ssh. However, since UFW is currently not enabled, I just get an "inactive" message when I run "ufw status".

Is there a special flag I can use or even some config file I can look at to see what rules are configured even when the firewall is disabled?

There is now a ufw show added command that will list the configured rules for you, even when the firewall is inactive. It was added as a fix for this bug report and added in v0.33

So now you can do:

# ufw status
Status: inactive
# ufw allow ssh
Rules updated
Rules updated (v6)
# ufw show added
Added user rules (see 'ufw status' for running firewall):
ufw allow 22
# ufw enable
Firewall is active and enabled on system startup
# ufw status
Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere
22 (v6)                    ALLOW       Anywhere (v6)

The format of the output from ufw show added makes it much easier to write the delete command for each rule too.

From the command line, there doesn't seem to be a way.  However, if you're SSH'ing from an Ubuntu box (to an Ubuntu box), you might want to try this, slightly convoluted method :

Basically, install gufw on the remote box, then connect with X forwarding and run the GUI.

On the remote device, after connecting with -X as an option :

sudo apt-get install gufw
sudo gufw

That will show you the ruleset without having to activate it.

Be warned that if the remote device is a true "headless" server, then installing GUFW might pull down an unpleasant number of dependencies.  But unless someone here know a trick to make UFW show you the output you need without activating it first, then this might be your only option.

I did try sudo ufw show raw, but that shows the iptables output, which I can't make head nor tail of.


How to make an already live Ubuntu pen-drive, a persistent one? I have created a USB flash drive with the latest Ubuntu version, but it is not persistent.
How can I make it persistent without repeating the whole process?

2017

Persistent partitions have not worked in syslinux Live Ubuntu systems since 14.04. This includes SDC, UNetbootin, Rufus etc.

If you really want to make an existing install persistent, you can build a casper-rw file in Windows and add it to the root of your flash drive, see https://www.pendrivelinux.com/casper-rw-creator-make-a-persistent-file-from-windows/

The casper-rw file will be limited to 4GB and only works on a FAT32 partition.

If you want the boot to be persistent press Shift, select language, press F6, hit Enter and type persistent, (For UNetbootin press Tab then F6)

if you want every session to be persistent, modify isolinux/txt.cfg as Danatela shows above (or for UNetbootin install modify syslinux.cfg the same way).

Probably easier to re-make the persistent drive using mkusb, it makes persistent partitions automatically.

I am not aware of any way to do this. You would have to just reformat the usb, and reinstall the os back on to it with persistence enabled. I use Pendrivelinux to install a live os onto a pendrive with persistence. It should be relatively easy to do. Hope that works.


Qtranslate linux alternatives? In Windows with Qtranslate you can select text from any program(ebook reader, pdf, doc etc.), press some shortkey and translate it. Are there any alternatives for Ubuntu/Linux? There a lot of extensions(like S3.Translator for Firefox) but they just translate something that's in the browser's tab.

I was also using Qtranslate when i was on Windows and missed it after switching to Linux. So i made a simple application for my own need. Hope it can help you too: https://github.com/yasirtug/ni-translate

Same Qtranslate you can try crow-traslation support for linux, https://github.com/crow-translate/crow-translate


bash profile works for user but not sudo I've modified my .profile to include a folder if a flash drive is plugged in. When running the command as the user it works fine but tells me the scrip must be run by sudo (this is what i want). However, when i try to run it with sudo i get "command not found"

I have a symlink (flash) in my /var/www folder pointing to my /media/flash drive. (nevermind this setup since is just for dev)

this is my user's .profile :

# set PATH so it includes flash scripts
if [ -d "/var/www/flash/scripts" ] ; then
    PATH="/var/www/flash/scripts:$PATH"
fi

when trying to run as sudo i get:

sudo: script: command not found

any ideas?

When you run the script as sudo you are trying to access root. So your $HOME/.profile wont be accessed instead /root/.profile will be accessed.

So make the changes what ever you did in $HOME/.profile to /root/.profile. To create /root/.profile. Use the following commands.

sudo su
cd /root
touch .profile

after making the changes try running the script.

or edit $HOME/.bashrc and add the following line

alias sudo='sudo env PATH=$PATH $@'

Hope this helps.

You can also move your file in a sudoers used directory :

    sudo mv $HOME/bash/script.sh /usr/sbin/


Dual boot menu not showing after installation of Ubuntu 12.04 Before installing Ubuntu 12.04, Windows XP with three drives were there. I've installed Ubuntu 12.04 64 bit in of the three drives which I've mentioned above, installation went fine but after installation Dual boot screen is not showing, windows is automatically loading.

I've tried answers which are found here and other Ubuntu forums but non of them is worked for me. From forums what I came to know is,Grub missing. To install or to repair it, I'm unable to login to Ubuntu, then how can upgrade grub in ubuntu.

You can repair Grub by booting an Ubuntu Live-CD and using the program "Boot-Repair".

If you have an Internet connection you can just insert your Ubuntu CD (the one you used for installing ubuntu 12.04) and select "Try Ubuntu". It will then boot a live environment of Ubuntu from the CD.
Here you can install Boot-Repair via the Terminal. Type:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

sudo apt-get install -y boot-repair && boot-repair

After that launch Boot-Repair and select "Recommended Repair".
That should do the trick and reconfigure/-install Grub.

Better and more detailed instructions can be found here: https://help.ubuntu.com/community/Boot-Repair

Good luck! :)

I do had the same problem.
It was all about loosing your boot up order.

Try restoring it...

You may use boot-repair.


How to connect to internet with nokia x2-01 I wanna connect my ubuntu pc to internet using my nokia x2-01

but i cant do it like other phones
it just detect the phone and display disconnected now you are offline
i tried gnome pp also
but invain
any solution?

Solved using  wvdial

Install wvdial from a Ubuntu Live CD
Execute this command in a terminal:

sudo wvdialconf

Execute this command in a terminal:

sudo gedit /etc/wvdial.conf

edit the file with your configuration.
Execute this command in a terminal:

sudo wvdial

it depends on the type of network line you are using.
form your service provider request for internet browsing settings for phone configuration and then you are good to go.
To connect to internet by using phone through PC kindly download Nokia PC suit and instal in your system and connect your data cable USB cord to the system. Now launch Nokia PC Suit and click on connect and select your Phone mode and click ok to connect to internet.


How do they work when you have two graphic cards on Ubuntu? I have an Asus-n552vw laptop that has two graphic cards:

1- intel HD graphics 530
2- nvidia Geforce GTX960m

And installed ubuntu 16.04.2. I don't know which graphic is in use at the moment and are they installed good or not? because when I trying to suspend, it gives me PCIe Error and I should do hard power off.

I have also Windows10 beside Ubuntu and it uses intel 530 graphic by default and it only use the nvidia 960m card when I run some softwares like solidworks.

I like to know how the Ubuntu works and how can I switch off the 960m and only use 530 on Ubuntu? Also solve the suspension problem!

I don't have dual GPU laptop anymore to test it, but used to, this sounds like NVIDIA Optimus (for switching between cards), on Linux this is handled by the bumblebee project.

https://bumblebee-project.org/

I believe it's in the universe/multiverse repo (universe is community maintained software, multiverse copyright restricted software). If for some reason these are not enabled on your machine (in case it complains it can't find the software), you can enable them with

sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo apt-get update

To install bumblebee

sudo apt-get install bumblebee bumblebee-nvidia linux-headers-generic primus
reboot

Now it should default to your intel gpu (for power saving reasons) on everything, to start an application with your dedicated card instead, you start it with the "optirun application-to-start" command, as in:

optirun blender
optirun nvidia-settings
...

The GTX 960m is obviously going to be a lot faster than an Intel HD card, so you'll most likely want to switch to that. Here's how you do it

ctrl+alt+t for terminal, then copy and paste this

sudo apt install nvidia-352

enter your password for installation, then reboot. Your system should default to your nVidia card now.


USB stuck in read-only cannot do anything I have a USB that is stuck in read only. I can't format it or delete its partitions. I was wondering if anyone knows of a way to fix this. In the fdisk screenshot the size of the partitions and the sectors seemed really unusual so i included a screenshot.

try mounting with read write options

sudo mount -t ntfs -o rw /dev/sdb1 /mnt

then try accessing it if doesn't work which is more likely cause i think you may have tried these obvious stuff then that unalloccated is weird just make a backup of all data , delete the partition from gparted ,delete the partition table just to be safe recreate a partition table and create an new healthy partition
if none of these works then just bring out the legendary pokemon,the last resort which is a little slow but always works "ONLY DO IT AS LAST RESORT"

dd if=/dev/zero of=/dev/sdb

this will fill the whole thing with zeros any corruption will be overwritten
. Good Luck

I had that issue and sadly i was forced to reinstall ubuntu and never replicated it again; i can tell you its not kernel related.

My afected Ubuntu had upgraded version via the software manager maybe your instalation updated version as well?

Im asking you this because upgrading your instalation to a new Ubuntu version via software update sometimes causes bugs and that happened in my case after upgrading to vivid vervet and went away after a fresh install.


VPN connection is locked in Ubuntu 17.04 After editing and adding a new connection (with ivacy-configuration file), when I try to use the connection a lock-symbol is shown near the connection icon and connection fails.

cunfiguration file is like this:

dev tun
proto tcp
remote germany-tcp.ivacy.net 80
persist-key
persist-tun
ca ca.crt
tls-auth Wdc.key 1
cipher AES-256-CBC
comp-lzo
verb 1
mute 20
route-method exe
route-delay 2
route 0.0.0.0 0.0.0.0
float
auth-user-pass
auth-retry interact
ifconfig-nowarn

syslog has more info, how to show (part of) logfile?
however, a few lines here:

   Jun 20 15:25:11 sebu-Lenovo-ideapad-110-15ISK gcr-prompter[3031]:
   GtkDialog mapped without a transient parent. **This is discouraged**. Jun
   20 15:25:29 sebu-Lenovo-ideapad-110-15ISK NetworkManager[801]: <info>
   [1497943529.8551]
   vpn-connection[0x557ee04c9150,677a6c1a-298a-434f-b873-f4936fd4c820,"Russia-Moscow-TCP",0]:
   VPN plugin: state changed: starting (3) Jun 20 15:25:29
   sebu-Lenovo-ideapad-110-15ISK NetworkManager[801]: <info>
   [1497943529.8551]
   vpn-connection[0x557ee04c9150,677a6c1a-298a-434f-b873-f4936fd4c820,"Russia-Moscow-TCP",0]:
   VPN connection: (ConnectInteractive) reply received Jun 20 15:25:29
   sebu-Lenovo-ideapad-110-15ISK nm-openvpn[3040]: **WARNING**: file
   '/home/sebu/Downloads/OpenVPN-Configs/Wdc.key' is group or others
   accessible Jun 20 15:25:29 sebu-Lenovo-ideapad-110-15ISK
   nm-openvpn[3040]: OpenVPN 2.4.0 x86_64-pc-linux-gnu [SSL (OpenSSL)]
   [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 10 2017
   Jun 20 15:25:29 sebu-Lenovo-ideapad-110-15ISK nm-openvpn[3040]:
   library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08 Jun 20
   15:25:30 sebu-Lenovo-ideapad-110-15ISK nm-openvpn[3040]: WARNING: No
   server certificate verification method has been enabled.  See
   http://openvpn.net/howto.html#mitm for more info. Jun 20 15:25:30
   sebu-Lenovo-ideapad-110-15ISK nm-openvpn[3040]: NOTE: the current
   --script-security setting may allow this configuration to call user-defined scripts

solution

change configuration file to United States-Chicago-UDP.ovpn,delete
United States-Chicago-TCP and add United States-Chicago-UDP instead.
Unfortunetly the number of available Servers is redused, i miss server in Switzerland and need to go to Win10 and connect to ch1.dns2use.com with a default configuration. (Windows almost become a Linux-baby now)
note: Ivacy Win10-setup fails without meaningful information, so i had to use default Windows configuration.
However, we look hopefully into the future ...

Thanks to @heynnema for great support!


OEM Installation problem (OEM option missing) I'm trying to figure out why the oem option is missing from different distributions of ubuntu(tried 12.04 and 14.04).Tried also with left shift key during boot but when i press F4 key(mode),i can see only the "normal" option.Am i doing something wrong here?Is there any available image for oem installation only ?Thank you in advance

Try booting to UEFI mode on boot of the computer (not the so) press the specific key to open the boot menu. From here select UEFI mode. That should get the options you need.


Fault [ 0.587243 ] etc. ? Ubuntu 14.04 Just before Ubuntu 14.04.3 LTS starts up a black screen appears with the text:

[ 0.587243 ] ACPI PCC Probe failed.

It is a notebook with UEFI Bios 2013.
How can I solve this problem please?

Already asked and answered I believe... http://permalink.gmane.org/gmane.linux.power-management.general/56400 Unless someone knows different.

But it seems to be an apparently harmless message that doesn't alter whether your system is working properly. Mine does exactly the same thing so unless your system has some other problem you haven't explained it's probably not worth worrying about


Windows hibernation: why lubuntu is prevented to mount a partition on which the hiberfil.sys is not present? I am aware why linux doesn't mount the hibernated windows system partition -- due to the hibernation flag. As far as I am aware, the hiberfil.sys is stored on windows system partition, then why does it prevent linux from mounting a different partition?

I have 4 partitions:

Lubuntu
Windows
Windows backup
DATA (file storage)

Basically, I couldn't care less for the windows system partition, I don't even mount it on linux. All I care about is sharing my files on both windows and linux through the DATA partition. Is there a way to achieve this while retaining the possibility of hibernating windows?

I found a solution to my question on my own.

  SOLUTION

  Wrote in terminal:

sudo ntfsfix /dev/sdXY

where sdXY is the partition I needed to mount, in my case - DATA partition.
With this I can hibernate windows and still be able to use the DATA partition on lubuntu without losing the hibernated data on windows, which is on windows system partition.

The short answer to the question: "why lubuntu is prevented to mount a partition on which the hiberfil.sys is not present?":

  Making changes to your Windows (ntfs) partition while it is hibernated could be dangerous--it could cause Windows to not resume from hibernation or to crash after resuming.

I only quoted this from the much more detailed answer https://askubuntu.com/a/145904/865596. (But I think this is correct because it sounds very reasonable and it got many upvotes)

Some people (with reputation 20 000+) say that writing on a hibernation flagged NTFS partition (for example by using code like "sudo ntfsfix /dev/sdXY") can result in data loss on the NTFS data partition. (see answers of Unable to load Windows(8.x) Partition in Ubuntu or in the comments of https://askubuntu.com/a/532753/865596 or https://ubuntuforums.org/showthread.php?t=2364784)

In https://askubuntu.com/a/532753/865596 people say that the solution https://askubuntu.com/a/552232/865596 can be very dangerous (see explanation in https://askubuntu.com/a/145904/865596).

I think https://askubuntu.com/a/145904/865596, https://askubuntu.com/a/843161/865596 and maybe https://askubuntu.com/a/843373/865596 might be safer solutions, but I am not an expert. I got to these solutions from https://ubuntuforums.org/showthread.php?t=2364784&s=6b0a085ceec98b88abc61f5d1e97ae5e&p=13660216#post13660216

This question might be related to my question Is dual-boot Windows 10 with hibernation and Ubunutu 18.04 dangerous? too.


Mount encrypted home during boot (dm-crypt, luks) I just installed Ubuntu 12.04 on my notebook having kept an old luks encrypted partition on my drive.
This partition shows up in the file manager an can be mounted from there into /media/[UUID].
Now I would like to mount this partition during system boot. For that I added

  /dev/mapper/cryptohome /home           xfs     errors=remount-ro 0 2

to my /etc/fstab and

  cryptohome UUID=[...] none luks

to my /etc/crypttab

During boot I am asked for the luks password upon which the /dev/mapper/cryptohome is ready.

While I enter the password the mount command seems to be executed concurrently.
This leads to a failed mount. I am able to mount /dev/mapper/cryptohome manually shortly after the automatic mount failes.

How can I make mount aware that it needs to wait until the luks password is entered successfully?

Thanks,
Philipp

I would recommend you to use a app called “Storage Device Manager”. It automatically mounts the device at boot without any hassle for me. maybe that can work for you. Full article about it can be read here:
http://www.howtogeek.com/60817/how-to-auto-mount-partitions-at-linux-startup-the-easy-way/


Nvidia graphics drivers not installing properly I am using Ubuntu 14.04 LTS

I didn't find a solution to my problem anywhere (even though I read countless threads about Nvidia drivers) and I am starting to think that it may be hardware problem.
I install drivers using (among others)

sudo apt-get install nvidia-current

And when it is installed i check:

lspci | grep VGA

But I get identical result as when I typed it before installation, that is:

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core
processor Graphics Controller (rev 09)

Moreover, when I reboot Ubuntu, it runs in low graphics mode, but starts normally after I uninstall drivers.

I tried reinstalling the system, but it also brought no effect at all.

After installing 'nvidia-current' did you execute 'nvidia-xconfig' to overwrite your default video configuration? If you did not it will not know to use your new nvidia configuration. Give it a try and let me know the result.


Enabling beep in Ubuntu12.04 A duplicate of Enable System Beep in Ubuntu. Nothing mentioned there worked.

I'm trying to enable beep in my Ubuntu 12.04 laptop and Ubuntu 14.04 desktop.

cout << "\a" in g++
echo -e "\a" in bash

I want the above two to produce a beep.

I followed this and searched it at other places, but nothing works. I have commented out blacklist pcspkr in /etc/modprobe.d/blacklist.conf. I have also enabled it in alsamixer.

> sudo apt-get install beep
> beep    // produces beep
> sudo modprobe pcspkr    // shows nothing
> lsmod | grep pcspkr
pcspkr                 12631  0
> sudo grep pcspkr /var/log/dmesg
[   16.278105] input: PC Speaker as /devices/platform/pcspkr/input/input8
> pactl upload-sample /usr/share/sounds/ubuntu/stereo/bell.ogg bell.ogg
> pactl list samples     // shows bell.ogg

But how do I make it beep using \a (esp in g++)?

Many sound cards have a "beep" channel, often muted:
run "alsamixer" in a terminal : you may need to press F6 and select your card. scroll to the Beep channel using the arrow keys and press M to unmute the channel. notice that the "MM" label below the channel will change to "00". you can also use ↑ to increase the volume of the channel.
press Esc to close alsamixer.

(From archwiki: beep)


"(CRON) info (No MTA installed, discarding output)" error in the syslog I have a fresh install of Ubuntu 12.04.1 LTS an a number of servers.

I have not added any cron jobs or edited my crontab on those servers, however, at around the same time for each machine, I get a 75% CPU spike and the following info in my syslog at the time of the spike:

CRON[8380]: (CRON) info (No MTA installed, discarding output)

I have mono-complete installed and am running a service stack webserver.

What is the best way for me to stop this from happening?  I would like to be able to remove the CPU spike.

Linux uses mail for sending notifications to the user. Most Linux distributions have a mail service including an MTA (Mail Transfer Agent) installed. Ubuntu doesn't though.

You can install a mail service, postfix for example, to solve this problem.

sudo apt-get install postfix

Or you can ignore it. I don't think the inability of cron to send messages has anything to do with the CPU spike (that's linked to the underlying job that cron is running). It might be safest to install an MTA and then read through the messages (mutt is a good system mail reader).

I had this problem using the Kitematic Docker tools.
Go to the magento container and click on exe.

Then run

apt-get update

This is if you're trying to get magento run on kitematic. The log will show this error on the virtual machine:

  need update.

Sorry if this got you lost, but that's how it works. You keep getting lost, but just read about it and the pieces will come together one day. Be patient.


Refresh desktop icons I have used mount --bind to mirror my Windows desktop folder to Ubuntu. I have set it up to mount on boot but the desktop does not refresh the icons so I have to logout and log back in to make the icons appear.

Thanks in advance.

Update:

I am running 12.10 if that changes anything.

Also I have tried killall nautilus.

Also right click in the applications folder on the .desktop icon and add to the desktop folder.

You shouldn't have to log out. Nautilus is responsible for rendering desktop icons, so just open a terminal (Ctrl+Alt+t), and then type killall nautilus. Your desktop icons will disappear, but they should come back shortly. If they don't come back, you can type Alt+F2 and then type nautilus to get the icons back (don't run nautilus in the terminal because it'll just get killed again when you close the terminal).


can't get GUI to start from command prompt I've been running Ubuntu for some time. Last night I installed the updates that automatically download periodically and shut down. This morning the machine will only boot to the command prompt. I've tried all the "fixes" I can find on-line without success. The startx command brings up a message "API mismatch: the NVIDIA kernel module has version 304.88 but this NVIDIA driver component has version 173.14.35."..
How do I make sure both are the same? What else can I do to get this machine to boot the GUI again?

Reinstalling your drivers will solve your problem:

sudo apt-get purge nvidia*
sudo apt-get install nvidia-current
sudo reboot

I've run into this and had to install the Nvidia driver from the command line.

If Ubuntu installed your nvidia package for you then I would suggest:

sudo apt-cache search nvidia

See what you get back.  I bet you can find a package to reinstall, like so:

sudo apt-get install nvidia-common (*which may show up as "already installed")

If its already installed.  Then I recommend removing it and reinstalling it:

sudo apt-get remove nvidia-common
sudo apt-get autoclean
sudo apt-get update
sudo apt-get install nvidia-common
sudo shutdown -r now

This will then reboot the pc.  If this does not work.  Try to download the source driver from Nvidia's site.  There you can also find the instructions to install the drivers from the drivers they offer for Linux.


How to get bash or ssh into a running container in background mode? I want to ssh or bash into a running docker container. Please, see example:

$ sudo docker run -d webserver
webserver is clean image from ubuntu:14.04
$ sudo docker ps
CONTAINER ID  IMAGE            COMMAND    CREATED STATUS  PORTS          NAMES
665b4a1e17b6  webserver:latest /bin/bash  ...     ...     22/tcp, 80/tcp loving_heisenberg

Now I want to get something like this (go into the running container):

$ sudo docker run -t -i webserver (or maybe 665b4a1e17b6 instead)
   $ root@665b4a1e17b6:/#

However when I run the line above I get new CONTAINER ID:

$ root@42f1e37bd0e5:/#

I used Vagrant and I'd like to get a  similar behaviour as vagrant ssh.

The answer is Docker's attach command. So for my example above, the solution will be:

$ sudo docker attach 665b4a1e17b6 #by ID
or
$ sudo docker attach loving_heisenberg #by Name
$ root@665b4a1e17b6:/#

For Docker version 1.3 or later: Thanks to user WiR3D who suggested another way to get a container's shell. If we use attach we can use only one instance of the shell. So if we want open a new terminal with a new instance of a container's shell, we just need to run the following:

$ sudo docker exec -i -t 665b4a1e17b6 /bin/bash #by ID

or

$ sudo docker exec -i -t loving_heisenberg /bin/bash #by Name
$ root@665b4a1e17b6:/#

if the container is stopped like for example a data-only container then a good solution is to run a throwaway container every time you want to attach to the data container. In this case the data container itself could be entirely empty, as the temporary container would have the OS tools.

$ docker run --rm --volumes-from mydata -it ubuntu bash
root@645045d3cc87:/# ls /mydata
root@645045d3cc87:/# touch /mydata/foo
root@645045d3cc87:/# exit
exit


How to control the screen rotation in ubuntu 12.10 via an icon on the panel? Is there is a program that displays an icon in the panel, to control the rotation of the monitor?

Here is a launcher using Unity quicklists (right click menus) to provide you with rotation options:

The result will be something like this:

You just need to follow these steps:

Create a new text file with this content:

[Desktop Entry]
Name=Rotate Screen
Exec=notify-send 'Choose an option from the quicklist' -t 2000 -i rotate
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=rotate
StartupNotify=false
X-Ayatana-Desktop-Shortcuts=Normal;Inverted;Right;Left

[Right Shortcut Group]
Name=Rotate Right
Exec=xrandr -o right
TargetEnvironment=Unity

[Left Shortcut Group]
Name=Rotate Left
Exec=xrandr -o left
TargetEnvironment=Unity

[Normal Shortcut Group]
Name=Normal
Exec=xrandr -o normal
TargetEnvironment=Unity

[Inverted Shortcut Group]
Name=Invert
Exec=xrandr -o inverted
TargetEnvironment=Unity

Save the file with a .desktop extension.
Make the new file executable (it will be called "Rotate Screen") through
Right click → Properties → Permissions tab → Allow executing files as program
Click and drag the file onto the launcher.

As for creating a desktop shortcut to rotate your screen, I think this link might be helpful.

Edited:
This will help you to create a desktop executable file to rotate your screen either to left, right, 180 degree, back to normal.(multiple files)
For Rotate Left:
1- In Terminal:

xrandr

look at the output and see what is connected (LVDS1, HDMI, VGA1, DP1,.. ). I will consider here that LVDS1 is connected.
2-
cd ~/Desktop
gedit rotate_left.desktop
3- paste the following code inside the opened text editor:

[Desktop Entry]
Type=Application
Terminal=false
Name=rotate_left
Exec=xrandr --output LVDS1 --rotate left
Name[en_US]=rotate_left

save and close.
4- In Terminal:

sudo chmod 755 rotate_Left.desktop

Now you have an executable file on your desktop to rotate screen left.
To rotate differently, just replace the word "left" with "right" inverted", "normal".
Hope this was helpful :-)


Virtualbox Ubuntu 17.04 cannot connect to the internet I upgraded Ubuntu 16.04 LTS to 17.04 last two days ago. Ever since, I've been trying to connect to the internet, tried to change the 'bridged adapter' under setting > network. left at "NAT" ( as default option ); still didn't work. I tried a few things that I saw on Youtube, but still is not connecting to internet.

At some point, I noticed under "VirtualBox Host-Only Network #2" IPv4 was set to some random IP address within my subnet mask  (at least looked that way to me). I changed to DHCP hoping it would fix the issue. No luck.

At this point, I have feeling that if for some one who is familiar with VM than I am, it might be just a few clicks and fix the issue. I seemed to cannot figure that out.

Can someone shed some light on what should I do next please?

I had a similar issue.  I tried switching to bridged, etc, and nothing seemed to work.  Eventually I switched back to NAT, and found out which interfaces were available:

lshw -C network

I noticed that the networking was DISABLED.  Then I manually brought up the interface:

ifconfig enp0s17 up

But after that it still wouldn't work.  I had to manually get it to get an IP address using

dhclient enp0s17 -v

That did the trick and it's working now.  Not sure if this will help your issue, but it fixed mine.

Set your network settings in VirtualBox to look like this...

Update #1:

Change eth0 to enp0s3.


What is the Difference Between `apt-get purge` and `apt-get remove`? Is there any difference between

sudo apt-get purge <package-name>

and

sudo apt-get remove <package-name>

?

I often see people recommend one or the other.

In other words, what does apt-get purge remove that apt-get remove doesn't?

As the man apt-get page says:

  remove - remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed.

  purge - purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).

This of course, does not apply to packages that hold configuration files inside the user's home folder (e.g. /home/SexyNoJutsuUser), these files will not be touched ( Why does "Purge" not remove everything related to an app? )

So for example, if you were to purge Chrome, Firefox, Kodi or any other that holds some configuration files inside your /home folder, these configuration files will stay there.

On the other hand if you were to install Apache, squid, MySQL or any other services similar that save their configuration files in /etc, these configuration files will be deleted if you use purge.

apt-get purge removes configuration files, while apt-get remove does not.


Modify keyboard layout/settings to accommodate jelly comb ultra slim I recently purchased the Jelly Comb Ultra Slim, so far it works very well with Windows 10, however, I currently run Ubuntu 16.04 as my main OS.

So I've tried a few tests and checked a few settings but I've been unable to determine how I'm supposed to fix this. I did find this link. As far as I can understand it, it says that this keyboard is imitating the way Windows keyboards work therefore it shouldn't work with Linux, and it doesn't. Side note: most of the keys don't seem to be sending any form of input in, as far as I can tell.

So my questions are: How can I make this bluetooth keyboard work, and how can I make sure I don't have to tweak any settings the next time I connect my keyboard.

I appreciate any help you can offer.

Problem solved:

This kind of bluetooth keyboard has a special functionality that is activated when NUM-LOCK is on (it's pretty useless). If you turn off NUM-LOCK the keyboard works as expected.

So if you're having this problem just turn off NUM-LOCK.

On Ubuntu 18 there was no gui for this, I installed apt install numlockx and ran numlockx off to disable it's strange preference for numlock defaulting to on.


Custom keyboard shortcut to lauch a terminal and run a command without exit in the end I want to create a shortcut to run a command with keyboard shortcut But when I press "alt+ctrl+a" terminal open and immediately close.

Please help me to edit below command for prevent from close after ran it.

gnome-terminal  -e "vnstat -ru -i wlan0 -h"

Try it with this command instead:

gnome-terminal -e "bash -c 'vnstat -ru -i wlan0 -h; exec bash'"

The exec bash part at the end causes to start a bash that replaces the current shell (also a bash).

create a keyboard shortcut with the following command :  gnome-terminal  . Thats it.


No devices were found i installed nvidia-driver-455 and didn't be detected by setting of laptop as in

and when i used
nvidia-smi
No devices were found

i tried to remove driver and reinstall it but this problem exists
Edit
i got
vendor   : NVIDIA Corporation
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-440-server - distro non-free
driver   : nvidia-driver-435 - distro non-free
driver   : nvidia-driver-450 - distro non-free
driver   : nvidia-driver-455 - third-party free recommended
driver   : nvidia-driver-418-server - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

vendor   : Intel Corporation
manual_install: True
driver   : backport-iwlwifi-dkms - distro free

Edit 2
00:02.0 VGA compatible controller: Intel Corporation Device 3e9b
    Subsystem: Lenovo Device 3ffd
    Kernel driver in use: i915
    Kernel modules: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1f11 (rev a1)
    Subsystem: Lenovo Device 3ffd
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

First of all, you need to find out which versions of the NVIDIA drivers are supported for your graphics card.
To see which card/chip you are using, use
ubuntu-drivers devices

and see the line under "model".
Now you can either browse the nvidia site and look which version is available for your card, or find other sources.
Then, if it is valid, you can choose to install the driver from the nvidia site or from the ubuntu repo (which usually is better set up to work with your ubuntu).
If you haven't had NVIDIA drivers installed on that linux installation, you might need to blacklist the open source "nouveau" drivers:
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"

After that, or every installation of graphics drivers, please reboot.
I hope that helped,
-- Streunekater


How to fix “Module ndiswrapper not found" I have Ubuntu 12.10 and whenever I run sudo modprobe ndiswrapper, I get the following error.

FATAL: Module ndiswrapper not found.

The command dkms status returns with...

ndiswrapper, 1.57, 3.2.0-32-generic, i686: installed

When I run ndiswrapper -v I am returned with this...

jason@jason:~$ ndiswrapper -v
utils version: '1.9', utils version needed by module: '1.9'
module details:
filename:       /lib/modules/3.5.0-18-generic/updates/dkms/ndiswrapper.ko
version:        1.58rc1
vermagic:       3.5.0-18-generic SMP mod_unload modversions 686

I have installed commons, utils-1.9, dkms, source but it's still returning this error. How do I fix this?

Based on what you have installed, this may seem silly, but have you installed ndiswrapper-dkms? That should allow you to sudo modprobe ndiswrapper.

You can either wait for a fix to the bug or follow steps outlined in the bug comments, something along these lines:

mkdir ~/src
cd ~/src
wget http://downloads.sourceforge.net/project/ndiswrapper/testing/ndiswrapper-1.58rc1.tar.gz
tar -xvf ndiswrapper-1.58rc1.tar.gz
cd ndiswrapper-1.58rc1
make
sudo make install


initramfs - Unable to find a medium containing a live file system I'm desperately trying to install ubuntu 12.10 64bit on my new Ultrabook.
Its a Sony T13 with 8gb ram, 256gb ssd, i7, windows 8.

I have an extra partition, D: "UBUNTU" already created with about 30gb space using FAT32.
Ubuntu is MD5 checked, on a previously working USB stick using UNetBootin.
Grub loads fine
When I ask to test out Ubuntu ("Try ubuntu without installing") it shows the purple loading screen for a bit then brings up this error in a busybox terminal:

initramfs - Unable to find a medium containing a live file system

Things I've tried that don't work:

Different versions of Linux (Fedora, Arch, SL, even gParted)
Using USB2/3 - No difference
Legacy or UEFI - different interface, but same error
BIOS has no option for anything "ACHI" related

I have read through tons of other people having this problem and diligently tried all the above solutions, with no luck.

Your situation may be different, but I was trying to install using a DVD in an IDE DVD-ROM drive onto an IDE HD.  The unlikely solution for me was to change the jumpers on the back of both drives to where the DVD-ROM drive was the master and the HD was the slave (both were previously set to be assigned by BIOS).  Again, worked for me, hope it works for you.  Took me a week of pulling my hair out to figure it out.

Try this ...

Hit delete to run setup and confirm if in the bios or somewhere (...) you don't have one option to boot with windows ... if you find it change it to others ...

It worked with me ... it solved that problem ... and i lost one hour reading foruns trying to find out one solution for that ... and the solution was as simple as that ...

Regards,
Carlos


How do I install and set up Apache 2 How can I install Apache2, php, mysql and set it up with virtual hosts and preferably Let's Encrypt SSL certificate, and then proceed to install Wordpress on it?

I assume that you have a running Ubuntu installation. This is written with 16.04 in mind but should work with some adaptions on other versions as well.

In this answers, # denotes a root shell, whilst $ denotes a normal user shell.

example.org is used as an example (D'oh) in this answer, and should be changed to suit your installation.

Installing Apache2, PHP, MariaDB and so forth

$ sudo apt install apache2 libapache2-mod-php mariadb-server php-mysql

This will install Apache2, PHP, MariaDB, and some dependencies, in addition to PHP bindings for accessing mysql.

At this stage, you should be able to access http://example.org, and see a default page:

Setting up a vhost

Vhosts are virtual hosts, which is used to serve different content for different domain names.

Start editing a new file called /etc/apache2/sites-available/01-example.org.conf in your favorite editor:

$ sudo editor /etc/apache2/sites-available/01-example.org.conf

Enter the following configuration:

<VirtualHost *:80>
        ServerName example.org
        ServerAlias www.example.org
        ServerAdmin webmaster@example.org
        DocumentRoot /var/www/html/example.org/
        ErrorLog ${APACHE_LOG_DIR}/example.org.error.log
        CustomLog ${APACHE_LOG_DIR}/example.org.access.log combined
</VirtualHost>

First, we define the primary ServerName. This is the domain used to access the site. Only one can be defined per vhost. In addition, we define a ServerAlias, in case someone enters www.example.org in their browser. This ensures that Apache replies to both names. Both names has to point to your server, either in DNS, or in /etc/hosts for local testing.

Any number of server aliases can be specified, and they do not have to contain parts of the ServerName. Thus, ServerAlias example.com would be valid.

Create the new DocumentRoot

I've placed the new documentroot in /var/www/html/example.org. This is a location that is allowed to be served by Apache in Ubuntu. If I, for instance, placed it in /srv/, I would have to include a Directory stanza for it. For now, create the webroot, fill it with some content, and activate the new config:

$ sudo mkdir /var/www/html/example.org
$ echo "This is a test" | sudo tee /var/www/html/example.org/index.html
$ sudo a2ensite 01-example.org.conf
$ sudo service apache2 reload

If you now visit http://example.org, you should see the output *This is a test". Congratulations! Your first vhost is running!

Install letsencrypt and grab certificates

To receive certificates from Let's Encrypt, we need a client. The letsencrypt package included with 16.04 is ancient, so we need a ppa for this.

$ echo "deb http://ppa.launchpad.net/certbot/certbot/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/01-certbot.list
$ sudo add-apt-key -k keyserver.ubuntu.com 8C47BE8E75BCA694
$ sudo apt update && sudo apt install certbot python3-certbot-apache

Run certbot as root:

$ sudo certbot

Select the domain you want to get a certificate for and follow the on-screen instructions by certbot. When asked if you want to redirect, select redirect if you want https only, and no redirect if you want both http and https. Today, there's almost no reason to not redirect.

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
-------------------------------------------------------------------------------
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel):

Try visiting http://example.com again - it should change to show that it is secure.

Congratulations, you have not set up apache2 with a valid TLS certificate that ensures traffic is encrypted!

Install WordPress

Next step is to install some application. I've picked WordPress as example to install.

First become root by entering sudo -i. Next, change directory to your webroot, and download, unpack and change ownership to Apache's user:

$ sudo -i
# cd /var/www/html/example.org/
# wget https://wordpress.org/latest.tar.gz
# tar -zxf latest.tar.gz && rm latest.tar.gz
# chown -R www-data.www-data wordpress/

You will now have a WordPress instance at https://example.com/wordpress/ - let's go there.

The wizard tells you that you need a MySQL table, user, and password. Let's make them!

By default, Ubuntu will use unix socket authentication for MariaDB. Thus, to log in to MariaDB as root, you have to use

sudo mysql -u root

or run the command in a root shell (for instance sudo -i). This will log you in without entering any password

# mysql -u root
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 32
Server version: 10.0.33-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE wordpress_db;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON `wordpress_db`.* TO 'wordpress_user'@'localhost' IDENTIFIED BY 'passw0rd';
Query OK, 0 rows affected (0.01 sec)
MariaDB [(none)]> exit

Fill in the username wordpress_user, databasename wordpress_db and password passw0rd in WordPress' configuration. That's basically it; the rest is about following WordPress' installation guidelines.

To add more vhosts, simply start from "Setting up a vhost".

Further reading

Apache modules - disabling and enabling
Running certbot from cron to autorenew certs
Guide for mod_rewrite, a commonly used Apache module
File permissions for /var/www/html
Certbot user guide

Install Apache In Ubuntu

sudo apt-get update
sudo apt-get install apache2
sudo ufw app list
sudo ufw allow 'Apache Full'
sudo ufw status // Status will be inactive.
sudo systemctl status apache2 // Apache server will be Active.

Check Apache Server
You can check your apache server is properly working or not via your IP.
Enter in your Browser

http://server_domain_or_IP

You will find the Default page.

Mange Apache Process

sudo systemctl stop apache2 // Stop Apache Server
sudo systemctl start apache2 // Start Apache Server
sudo systemctl restart apache2 // Restart Apache Server
sudo systemctl reload apache2 // Reload Apache Server
sudo systemctl disable apache2 // Disable Auto Start Server
sudo systemctl enable apache2 // Enable Auto Start Server


How do I install Windows 7 alongside a pre-existing Ubuntu installation? I purchased a PC six months ago for work related tasks. I do 95% of my work on Ubuntu (web development). Now, I want to install Windows on another partition to play a few games on my relax time. Which steps should I follow? Any suggestions? Every guide I found suggest to install Windows and, after that, Ubuntu. Being this my main development machine, I cannot afford the risk of wiping everything.

First, back up your data. Keep in mind, when installing an OS, over writing data is often a mouse click away.

Second, boot the ubuntu desktop CD, resize your partitions, and make a NTFS partition for Windows.

Then install Windows into the NTFS partitions. You may need to find drivers for your hardware.

Then boot the Ubuntu CD again and re-install grub. You can do this graphically with boot-repair

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

See https://help.ubuntu.com/community/Boot-Repair for details.

Here is a simple way to dual-boot Windows with Ubuntu:

First of all, back up ALL of your data on to another Hard Drive. Standard HDDs are very cheap these days so that shouldn't be a problem.

Next, put the installation CD into the disk drive and turn off your PC.

Now you are going to have to make sure that you have no external or internal drives plugged in except for your disk drive/installation USB and your hardrive that is currently running Ubuntu.

When you turn on your PC, quickly press delete or F2 depending on your motherboard to get to the BIOS settings. Every motherboard has different BIOS so you might need to refer to your user manual for this next step. You will need to boot from your installation media (CD or USB flashdrive) in my case, I simply have to go to boot selection and select "(UEFI) CD Drive" or rearrange the drives so that CD Drive is first and save the settings.

Your PC should be rebooted and you will boot into the CD. Now you will see the Windows 7 installation screen. Select the appropriate settings and then select custom installation. Now select your Hard Drive and click "format" this will remove everything on your drive (This means everything. Including Ubuntu and all of your data. assuming you actually backed it up.) now you will need to install. Windows.

When Windows finishes installing, you can now create your Ubuntu installation media and boot from that. When you boot it will ask you if you want to install or try Ubuntu. Select "Try Ubuntu" and click on the application on the desktop called "Install Ubuntu" Now select your appropriate settings (make sure you are connected to the internet!) select "Install this Third Party Software" and select "Install updates during installation" now click on next.

Now click on "Install Ubuntu alongside Windows Boot Manager" and wait for it to install.

When it finishes installing, restart your PC and go into BIOS settings. Now make sure that Ubuntu boots before Windows and save your settings.

When you restart your PC, it will ask you if you want to boot from Ubuntu or Windows. Use the up and down arrows to select one and press enter to boot. If it takes you more that 10 seconds to choose something, you will automatically boot into Ubuntu.

There you go. I hope it helped.


How to remove snap store from Ubuntu? How do I remove snap? apt pretends it's not there but I can still call commands with it.

Trying to rm it says "read only file system"

root@tunnel:/# apt remove snap
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'snap' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@tunnel:/# snap whoami
email: -

The package is not called snap, but instead is snapd.
You will want to do
sudo apt autoremove --purge snapd

if you want to remove snap store then you have to execute the following command in terminal:
sudo apt autoremove snapd


Fatal error : grub installation /dev/SDA failed I am trying to install Ubuntu from past 3 days and constantly getting the above mentioned error.
I have windows 10 with UEFI and want to dual boot it with windows using Ubuntu image in USB.
For the first time it installed properly but efibootmgr was not able to detect Ubuntu so I was not able to change boot preference. So I deleted the partition and again created the partition and booted into Ubuntu.
Since then I'm getting that error.
Please help me.

You have to install grub into /dev/sda2 as it is the ESP where bootloder belong in UEFI boot.

Why? on preinstalled windows 10 there is following partion created befor installing linux for the firtst time:

300 MiB restore
100 MiB ESP (needs the mount point /boot/EFI in the system later)
most of the disk windows C
optional windows D for data, videos programs, document stiff like that

so to install grub rigt you have to install it on sda2.

sudo grub-install [options] /dev/sda2

see grub-install --help for details for options. Also man 8 grub for more details on grub or the grub Manual online here.


Uninstalling ubuntu from one hard drive and installing on another I currently have ubuntu installed on a hard drive which already had windows and now I've installed a slave drive I was wondering how to remove or at least move ubuntu onto the other drive so one drive is windows and the other is Windows XP

Copy the partitions over to the other disk.  Boot.  Update-grub so it sees both as bootable.  Fix your fstab on the second one.  Make sure it's only using the second disk with df.  Once it's working delete the old partitions.

use a tool called a remastersys to backup ur existing system and create a bootable iso which u can put it into a usb and re install with all your settings and file restored...

PS clean up your home congaing personal files to make iso smaller


Unable to install wine on ubuntu 14.04 lts I am using following article to fix this issue:
http://ubuntuforums.org/showthread.php?t=2246183

This is the output I get:

aditya@aditya-Vostro-3446:~/$ sudo apt-get purge wine
[sudo] password for aditya:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package wine is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 41 not upgraded.
aditya@aditya-Vostro-3446:~/$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done

0 upgraded, 0 newly installed, 0 to remove and 41 not upgraded.
aditya@aditya-Vostro-3446:~/$
aditya@aditya-Vostro-3446:~/$ sudo apt-get install wine
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 wine : Depends: wine1.6 but it is not going to be installed or
                 wine1.7 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

And when I try to install wine using ubuntu software center I get following message:

The following packages have unmet dependencies:

q4wine: Depends: libc6 (>= 2.14) but 2.15-0ubuntu10.9 is to be installed
        Depends: libgcc1 (>= 1:4.1.1) but 1:4.6.3-1ubuntu5 is to be installed
        Depends: libqt4-dbus (>= 4:4.5.3) but 4:4.8.1-0ubuntu4.8 is to be installed
        Depends: libqt4-network (>= 4:4.5.3) but 4:4.8.1-0ubuntu4.8 is to be installed
        Depends: libqt4-sql (>= 4:4.5.3) but 4:4.8.1-0ubuntu4.8 is to be installed
        Depends: libqt4-xml (>= 4:4.5.3) but 4:4.8.1-0ubuntu4.8 is to be installed
        Depends: libqtcore4 (>= 4:4.8.0) but 4:4.8.1-0ubuntu4.8 is to be installed
        Depends: libqtgui4 (>= 4:4.5.3) but 4:4.8.1-0ubuntu4.8 is to be installed
        Depends: libstdc++6 (>= 4.1.1) but 4.6.3-1ubuntu5 is to be installed

You can try one of the following:

sudo apt-get -f install

To force install the dependencies and such.

Or try installing it via the Ubuntu Wine Team PPA:

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.7

you need to reinstall package ttf-mscorefonts-installer because by default the license for this package is not accepted, you need to manually accept the license for this package."Microsoft's core fonts package has unmet dependencies in wine.

"first remove them from your system as

sudo apt-get remove ttf-mscorefonts-installer

then re-install

sudo apt-get install ttf-mscorefonts-installer

then accept the license using tab key in a graphical interface after doing this install any version of wine,you can install wine from software centre .This package is also required if you want to install adobe flash player plugin.Note: wine1.6.2 is the stable release and Wine 1.7.34 is the latest wine release as of now.You can refer to

wine HQ


Nvidia Driver won't install on Ubuntu 20.04 Installed driver with this command:
$ sudo apt install nvidia-driver-440

but when i want to check Nvidia driver, I'm getting this error:
$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running

If I look at Nvidia-settings, the window will show up, but all i can see is: Select GPU you would like to use and 3 options below, and nothing else. Here's the output:
$ nvidia-settings

ERROR: NVIDIA driver is not loaded

ERROR: Unable to load info from any available system

(nvidia-settings:7221): GLib-GObject-CRITICAL **: 16:08:55.807: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 16:08:55.810: PRIME: Requires offloading
** Message: 16:08:55.810: PRIME: is it supported? yes
** Message: 16:08:55.837: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 16:08:55.837: PRIME: on-demand mode: "1"
** Message: 16:08:55.837: PRIME: is "on-demand" mode supported? yes

in Software & Updates > Additional Drivers, I chose: Using NVIDIA driver metapackage from nvidia-driver-440 (proprietary, tested)
In Settings > About, Graphics: displays integrated Intel, instead of Nvidia 1050TI
Did everything as in
This  comment, :
$ prime-select query
nvidia

It says nvidia, but still nothing's working
FIXED:
I managed to fix it by disabling secure boot in BIOS

You have the correct Nvidia 440 proprietary graphics packages from the default Ubuntu 20.04 repositories installed, but the integrated Intel graphics processor is being used instead of Nvidia graphics. Disable Secure Boot in BIOS/UEFI.

I had the same Graphics and issues with install via Software Updater.
Solution was fresh new install and thick box " Instal third party software".
Now I am running through Mesa Intel® HD Graphics 630 (KBL GT2) driver.
If you just install restricted-extras without full purge, it won't work.
Let me know if you installed already " Third party software ?  I am kind of sure, it wasn't done  ;) Just let system choose the right driver.
After that, you don't need to install any other graphics driver.
For addition after successful install, you can change your mode to "Powersafe " for better energy management. You should also ensure, your Bios setup has dislable " Secure boot ". Hope it'll works.


How to solve this (missing: CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) issue? I am trying to install Torch using this thread

And when I tried run ./install.sh which installs LuaJIT, LuaRocks, and then uses LuaRocks (the Lua package manager) to install core packages like a torch, an NN and paths, as well as a few other packages.

I am getting this error:

CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find CUDA (missing: CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (found suitable version "8.0", minimum required is "6.5") Call Stack (most recent call first): /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) /home/htic/torch/install/share/cmake/torch/FindCUDA.cmake:1009 (find_package_handle_standard_args) CMakeLists.txt:7 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred! See also "/home/htic/torch/extra/cutorch/build/CMakeFiles/CMakeOutput.log".
Error: Build error: Failed building.

In bash file, I have tried:

export LD_LIBRARY_PATH="/usr/local/cuda-8.0/lib64/:$LD_LIBRARY_PATH"
export CUDNN_PATH="/usr/local/cuda-8.0/lib64/libcudnn.so.6" export CUDA_INCLUDE_DIRS="/usr/local/cuda-8.0/include"

and creating a symlink /usr/local/cuda-8.0 as /usr/local/cuda but still, the error persists.

I had the same issue. A combination of the following things helped:

installed CUDA 9.1 with deb package and ran

sudo apt-get remove nvidia-cuda-toolkit

which I had installed previously and which gave me CUDA 7.5
ran

sudo apt-get autoremove

before trying again to run ./install.sh I ran "sudo ./clean.sh" in the torch directory

(I am using Linux Mint 18)


BCM43142 monitor mode : operation not suported! I'm using Ubuntu 14.04 LTS in an HP pavilion 15 laptop which has BCM43142 hybrid adapter. But when I try to put my adapter in monitor mode I get the following message :

  Error for wireless request "Set Mode" (8B06) :
      SET failed on device wlan0 ; Operation not supported.

I am a total beginner and don't not know much about Linux systems but I can surely say that my hardware supports monitor mode as Acrylic WiFi software in windows does it gracefully.

You are right, your hardware supports Monitor Mode and many more interesting stuff. But the driver which Broadcom has released for linux OSes do not support any of these. This is why it is possible in Windows but not on Linux.
 You can read more about it here.

The official driver of BCM43142 802.11b/g/n does not support monitor mode.

Hopefully there is a driver called b43 that supports it.

you can install it that way :

sudo apt-get install b43-fwcutter firmware-b43-installer

check this answer .


ISO Image Extraction Failure Rufus I'm trying to install Ubuntu 16.04 from a USB drive. I'm using Rufus to create a bootable stick, but everytime I click start, it starts, and then gives the error ISO image extraction failure. What can I do?

What can I do?

Check the MD5 of your ISO which too few people know you can ACTUALLY do using Rufus! Just click on the (✓) button next to SELECT (Rufus 3.0 or later) or the # button at the bottom of the Rufus interface (Rufus 2.18 or earlier) after selecting your ISO. There is no need to use another tool.
Run a bad blocks check in Rufus, to make sure that the issue isn't with your flash drive.
Report that issue in the official issue tracker for Rufus, along with your full log from Rufus, as this is the best place to get help with Rufus issues.

Just run rufus as administrator and it works on Windows 10. Otherwise it cannot find the iso file or downloads folder.