How to set hibernation in apollo ubuntu?

Solution found

refind bootloader contains the kernel options

so we edit /boot/refind_linux.conf

"Boot with standard options"  "ro root=/dev/mmcblk1p2  quiet splash resume=/dev/sda1"
"Boot to single-user mode"    "ro root=/dev/mmcblk1p2  quiet splash single"
"Boot with minimal options"   "ro root=/dev/mmcblk1p2"

and works

cat /proc/cmdline
\boot\vmlinuz-4.13.0-16-generic.efi.signed ro root=/dev/mmcblk1p2  quiet splash resume=/dev/sda1 initrd=boot\initrd.img-4.13.0-16-generic


Using your Ubuntu installation media (USB since optical drive doesn't work), boot up and choose try Ubuntu.

Identify the drive by issuing the command sudo fdisk -l

once you've identified it you can choose one of the following options (in both cases change X to the drive designation obtained using the above command) :

Option 1

sudo dd if=/dev/zero of=/dev/sdX
and on completion
sync

Note: You can substitute /dev/random or /dev/urandom for /dev/zero  in the above command if you prefer what some consider a more secure method.

/dev/random should be suitable for uses that need very high quality randomness such as one-time pad or key generation. When the entropy pool is empty, reads from /dev/random will block until additional environmental noise is gathered. A read from the /dev/urandom device will not block waiting for more entropy and for this reason is likely to be faster than /dev/random.

This process can take quite a while and will produce no progress report until it's complete.

It's useful to note that you may be able to speed up the process by setting a larger block size with the bs or obs options. For more details on these and other available options see man dd

Option2
If you want a progress report install dc3dd

sudo apt-get install dc3dd

then issue the command

sudo dc3dd wipe=/dev/sdX dc3dd will provide output throughout the process on speed and completion.

The wipe option defaults to using zeros, but can be modified with the following switches for those who believe that overwriting with a pattern is preferable.

pat=HEX              Use pattern as input, writing HEX to every byte
                    of the output. This option can only be used once
                    and cannot be combined with if=, ifs=, or
                    tpat=.
tpat=TEXT            Use text pattern as input, writing the string TEXT
                    repeatedly to the output. This option can only be
                    used once and cannot be combined with if=, ifs=,
                    or pat=.

dc3dd doesn't appear to install a man page by default, for more information on this program see one of the following pages:

http://www.linuxcertif.com/man/1/dc3dd/

https://plus.google.com/+KarlBernard/posts/CFzGx6kNaHR


What location to put bootloader, when running multiple drives and partition

While your Windows resides on sta and its partitions, it is perfectly fine to install Ubuntu on a stb partition and choose to install bootloader (which is GRUB by default) on stb. Ubuntu will otomatically find your Windows installation and add it to the bootloader menu. After this, go to your BIOS and choose the entry that corresponds to stb as the first boot option.

When you boot your computer, you should first get the GRUB screen and be able to choose either Ubuntu or Windows.


Using the standard Ubuntu bluetooth GUI, the solution is not to use the 1+2 button method, but to use the sync button behind the wiimote, you can setup the wiimote without pairing, the wiimote will remain recognized but apparently unpaired (no lights in the wiimote), and then you can "activate" the wiimote from the GUI and press again the "sync" button, now it will remain paired (without inputting a pair-code) one of the single LEDs will remain on (it will not rumble though)

then with the "+" "-" buttons you can control the volume of Ubuntu, and with the dpad you can move the focus on whatever is selected according to the direction you press amongst other things, so the wiimote is active and working, now you're set! :)


What Weather Monitor (weather station) software is available?

Here are a few options that might be of use/interest:

weeWX
wvview
MeteoStationNM
Weather Station Datalogger

At least a couple have Ubuntu packages available from their site, and most support some sort of export in format suitable for WeatherUnderground or CWOP.


how can i solve this error when trirng to install dukto?

Dukto is not found in any of the regular Ubuntu repositories, but you have a couple of options to get it installed:

Download it from the home page, then install the .deb with the following command:
sudo dpkg -i dukto_6.0-1_amd64.deb

Note: Be sure to be in the same directory as the .deb file if you plan on installing the package this way.
Add the source repository to your installation, then install it:
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/colomboem/xUbuntu_16.04/ /' > /etc/apt/sources.list.d/dukto.list"
sudo apt-get update
sudo apt-get install dukto

However, ...
Be warned that dukto has not been updated in several years:

The most recent release is for Ubuntu 16.04, which is in its last month of support. If you really must use this package, you may want to run it from an Ubuntu 16.04 installation that is contained in a virtual machine. This will ensure the host system is secured with up-to-date security fixes and installation of the dukto package works because it is isolated in a VM.


I want to know how to create a multi boot DVD with all the Ubuntu flavors (Kubuntu, lubuntu, Xubuntu and Ubuntu)

You best solution would be to use 4 different LiveUSBs.  They boot faster and you can use the "Try Ubuntu, (Kubuntu, Lubuntu, Xubuntu) option without having to change anything on the computer you are using.  You will need to change the BIOS to boot from your LiveUSB for you first boot from USB.  Each LiveUSB should be of the 8Gb variety, 4 Gb probably will not allow enough room.  Easy to accomplish, once you have Ubuntu running simply use the "Create Startup Disk" utility in the Applications Launcher tell which ISO and where to place the image, it does the rest and the LiveUSB is created.

Maybe, not the answer you were looking for, but hope this helps.


Running this command solved the issue;
mkdir /home/$USER/.steam/ubuntu12_32/steam-runtime


How to installation startup-manager on Ubuntu 13.10?

startup-manager is no longer available in Ubuntu 13.10

Try Grub Customizer

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer


You can disable a user with

at 0:00 Fri smbpasswd -x {user}

You can read this as "at 0:00 on Friday start smbpassword and remove {user}'s password.

You can enable a user with

at 0:00 Sat smbpasswd -x {user} -W {password}

You can read this as "at 0:00 on Saturday start smbpassword and set {password} for {user}.

The password is shown in plain text in the process list.
This is a command line method that survives reboots.

If you want this automated you can add those 2 lines to a script. See How do I run a script at start up? on a couple of methods)


Wifi unable to connect after upgrade to 17.04

There is a well-known bug in Network Manager in Ubuntu 17.04. Let's amend one file and try to fix it. Please open a terminal and do:

gksudo gedit /etc/NetworkManager/NetworkManager.conf

Use nano or kate or leafpad if you don't have the text editor gedit. Add lines:

[device]
wifi.scan-rand-mac-address=0

Save and close file then reboot. Now are you able to connect?


The software packages on each mirror are identical.
You can test this for yourself by checking the hash of any package from different mirrors. The hash will be identical.
Local mirrors are a convenience for you provided by volunteers (not Canonical). A local mirror may (or may not) offer faster downloads. You can use any mirror in the world that you can reach.
Since mirrors are volunteers efforts, new mirrors join and old mirrors drop out. Occasionally a mirror may fall a day or two behind...but be patient: It will catch up when the local problem is resolved.


Click in the window to make it active, then hold ALT and hit space - a small menu will appear at the top left corner of the window. You will see:

Minimize
Maximize / Unmaximize
Move
Resize
Always on top
Close

"Unmaximize" is present if you have the window "maximized".
"Move" makes the arrow keys usable for moving the window (press ESC to exit this mode), same for "Resize".

Press ENTER when you're done with your adjustments.


Add you as a vboxusers user. You have to be in the vboxusers group.

sudo adduser $USER vboxusers

To verify it:

$ groups
yourUserName : yourUserName adm cdrom sudo dip plugdev lpadmin scanner sambashare vboxusers

If this still doesn't work, Log out and log back in.


Unable to execute script before reboot or shutdown

If you are on a newer ubuntu version (ubuntu 16.04 or newer) you should use systemd instead of sysvinit.

An example could look like this (place it in /etc/systemd/system/pulse-vpn.service:

[Unit]
Description=Pulse VPN Client

[Service]
Type=simple
ExecStop=/path/to/your/script

[Install]
WantedBy=multi-user.target

To enable this, run

$ sudo systemctl daemon-reload
$ sudo systemctl enable pulse-vpn.service


The device currently is mounted on /mnt. That's what the bold line in the output of (probably) df -h says. So just open your file browser and go to the root. In Nautilus (the standard file browser of Ubuntu) just click on "Computer" in the navigation on the right. Then open the folder mnt.


I follow the answer for this question, and install aptitude. It allows me to downgrade libtinfo5, which fixes the dependency. This is actually great, I'm surprised aptitude has not been as popular as apt-get (at least for me.)


Which is better AMD or Nvidia cards for Linux?

If you want to use open source drivers, AMD is the way to go, but if you game and want max performance, Nvidia is better. AMD's open source drivers are much more developed than Nvidia open source drivers but Nvidia's proprietary drivers beat any of AMD's drivers.

Here you can see some benchmarks for more info.


Getting a Linux Mint graphical interface on Ubuntu 12.04.2 Server

Does it have to be cinnamon that you install on the machine?

Try

sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get update
sudo apt-get install cinnamon

That will install cinnamon (the Mint desktop) on your machine.
If it can be any other desktop environment (XFCE is nice, lightweight and easy to use) you can use

sudo apt-get install <desktop name>

e.g. xubuntu-desktop lubuntu-desktop or kubuntu-desktop for XFCE, LXDE and KDE respectively

EDIT: This website has a tutorial for installing it

http://www.linuxbsdos.com/2012/04/26/install-the-latest-and-greatest-cinnamon-desktop-on-ubuntu-12-04/


Trash works on NTFS when mounted by Nautilus, but not when automounted via /etc/fstab

I believe Nautilus needs a .Trash-1000 folder in the root of the filesystem (e.g. /media/D_0931_data/.Trash-1000) to exist and be user-writeable.

NOTE: the 1000 in the .Trash-1000 is your user ID. You can get yours by id -u USERNAME. Change it accordingly if needed.

Try running this: sudo mkdir /media/D_0931_data/.Trash-1000; sudo chmod 777 /media/D_0931_data/.Trash-1000.

If that didn't work, can you try the same but with .Trash instead of Trash-1000, and if that didn't work, post the output of ls -la /media/D_0931_data?

Try adding this to fstab (on the ntfs line): defaults,uid=1000 instead of just defaults.


As you found you are getting a warning doing it the way you mentioned. If your physically at your computer do this:

sudo ifdown -a
sudo ifup -a

For SSH session one should read:

http://codeghar.wordpress.com/2011/07/18/debian-running-etcinit-dnetworking-restart-is-deprecated-because-it-may-not-enable-again-some-interfaces/

Anyhow for SSH you might do this:

sudo nohup sh -c "ifdown eth0 -a && ifup eth0 -a"

another suggestion about bridging is mentioned here:
http://codeghar.wordpress.com/2011/07/18/debian-running-etcinit-dnetworking-restart-is-deprecated-because-it-may-not-enable-again-some-interfaces/#comment-2108


Creating a Full install Ubuntu SD card from a Pre-built Image File that Boots BIOS and UEFI

Download Image File: https://phillw.net/isos/linux-tools/uefi-n-bios/dd_unb_ubuntu-20.04_15GB_2020-06-26.img.xz

Download Rufus*: https://github.com/pbatard/rufus/releases/download/v3.11/rufus-3.11.exe

Double click Rufus exe file. (No need to install it).

Select SD card as Target drive in Rufus.

Select above Image File in Rufus.

Click Rufus start button.

Wait for flashing to complete... Done.

(Password is "changeme", change it),
The SD card should boot on almost any modern X86-64 computer.
Thanks to sudodus for the image file.
In Windows it may be necessary to install 7Zip before proceeding. Rufus will use it when working with the .xz image: https://www.7-zip.org/a/7z1900-x64.exe
*In Ubuntu you can use mkusb, Disks or Etcher to flash the SD card.


Wine or VM (Virtual Box) to run windows application (like Photoshop) Update to '18

Short answer
WINE is faster and uses less resources than a VM, especially if the VM is emulating a high speed and/or multicore processor.
Long answer
WINE is a command shell. It takes Windows commands/function calls and converts them to Linux commands/function calls. Thus it runs at near native speed and has native access to all system hardware. However, it is not a true windows install, so some programs either won't run or require very specific settings.
A VM is an emulator. It is a program that pretends to be a CPU, GPU and hardware of a computer. Thus, everything runs within this emulation environment with user interfaces being fed to/read from the host system. VM's can take an actual Windows install and run all programs that would normally run in Windows. However, the down side is lower performance and higher resource usage, because you are running the emulator in addition to the program. I don't remember exactly, but I believe the load of an emuulator is 1.5-2 times the the CPU you are emulating. ie A 1 GHz emulator will use 1.5-2 GHz of CPU when running a program.


Download the file again and check that it is correct by following the instructions on this page.


How to boot UbuntuMate from usb (micro-SD) on VirtualBox [Mac OS X]

Usually you do not install OS for Odroids, you burn pre-compiled image so are you trying to boot your VM from Odroids Ubuntu-mate disk image? If so it won't work, one of the reasons is different CPU architecture.

If you are trying to install Ubuntu Mate from bootable sd-card it is much easier to do so with .iso image or adding SD card as removable disk in settings and then on boot choose the right disk.


how to install ubuntu on vmware workstation?

Since you are root you can make any changes you need.

First add your non-root user, and add them to the sudoers group:

# useradd -d /home/testuser -m testuser

# passwd testuser

# adduser testuser sudo

Then you can install one of the virtual packages for the GUI of your choice, do this as either your root or your non-root user via sudo:

$ sudo apt-get update

$ sudo apt-cache search ubuntu-desktop
ubuntu-desktop - The Ubuntu desktop system
edubuntu-desktop - educational desktop for Ubuntu
kubuntu-desktop - Kubuntu Plasma Desktop/Netbook system
lubuntu-desktop - Lubuntu Desktop environment
xubuntu-desktop - Xubuntu desktop system

$ sudo apt-get install ubuntu-desktop

... go get a drink after you accept the prompt.

$ startx

See for more details:

http://www.ehow.com/how_5745914_convert-ubuntu-server-desktop.html
http://www.howtogeek.com/howto/ubuntu/add-a-user-on-ubuntu-server/
How can I add a new user as sudoer using the command line?
What kinds of desktop environments and shells are available?


Change the background color of command line in zsh when I change the prompt theme

For example, I changed in ~/.oh-my-zsh/themes/example.zsh-theme file the line:

PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% "

with the line:

PROMPT="%{$bg[cyan]%}%{$fg[red]%}%n%{$reset_color%}%{$bg[cyan]%}@%{$fg[red]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%{$bg[cyan]%}%% "

And look what happened:

So, I suggest you to play in the same manner with which theme do you wish from  ~/.oh-my-zsh/themes directory.


Where is the Google Search Bar in Unity?

That screenshot is out of date. Current Unity as it ships in 10.10 does not have a text field in the top panel. Search will be implemented in what we call Lenses.


Dell D620 can't detect external monitor when docked

Have you tried activating the monitor through the Nvidia X-Server Settings? I couldn't change the resolution through 'Displays', but once I turned on the monitor through the Nvidia control panel, my external monitor started working.

I am using the Nvidia NVS 3100M with a Lenovo Thinkpad T510.


While you certainly could use a shell loop, Awk is perfectly capable of processing multiple files directly ex. given
$ head file{A,B}.txt
==> fileA.txt <==
1 2 3
4 5 6
7 8 9

==> fileB.txt <==
1 2 3
4 5 6
7 8 9

then
$ awk '{print v, $0 > "file" v "a.txt"}' v=A fileA.txt v=B fileB.txt

produces
$ head file{A,B}a.txt
==> fileAa.txt <==
A 1 2 3
A 4 5 6
A 7 8 9

==> fileBa.txt <==
B 1 2 3
B 4 5 6
B 7 8 9


Unity application lens removed, no local apps now

Use

sudo apt-get install unity-lens-applications

To restore Applications Lens

To turn off software recommendations, use UnSettings

Just turn off the "Apps for download" switcher.

Unsettings download page.


How can I activate a Desktop Environment?

Yeah, both these answers give a good answer to your question:

Switching window manager/desktop environments?
How do I install LXDE / Lubuntu?

But somehow they forget to mention that you must click on the small logo/circle which resides beside your username when starting your session. Something that you won't see if you have auto-login activated. So...

1.- If you write a password in order to start your Ubuntu session, simply click on the small icon (maybe a circle, an ubuntu logo or another thing depending on your current theme), and choose your desired Desktop environment from the list.

or...

2.- If you have auto-login activated, first close your current session in order to see the options mentioned on the step.

Good luck!


Just in case anyone else also runs into a similar problem:

One option is to use dpkg and where necessary force the installation / configuration of certain packages. I came to this question because of the mentioning of openssh-server, which in my case was stuck.

  openssh-server : Depends: openssh-client (= 1:5.9p1-5ubuntu1.2)

It was stuck because openssh-client was already updated (somehow) to 1.4.
I managed to solve this by force the configuration of the openssh-server by using

  $> dpkg --force-depends-version --configure openssh-server

which installed the openssh-server, which then allowed me to update the openssh-server to a newer version corresponding with the installed openssh-client version.


Trying to solve a NO SOUND issue in Unity on 14.04. Sound Settings now unstable

try to use alsamixercommand in your terminal and unmute all


What is the format of the youtube-dl configuration file?

There is no format.  Just put the command line options in the file, e.g.--extract-audio --no-mtime

Source

So one line per configuration option, for example to change the default directory keeping the standard file name, just this line would be needed:

-o '~/Downloads/%(title)s-%(id)s.%(ext)s'


Standard users are unable to share their respective "Public" folders

There are 3 issues with sharing of "Public" folder by standard (non-administrator) users
This answer relates to Local Network Sharing of the Public folder within each users "Home" folder, /home/$USER/Public. When one right clicks on this folder and selects Local Network Share One would see this window:

1. First time sharing in this computer
If no one else has ever shared a "Public" folder in this computer, samba will not be installed. The user will see:

On clicking Install Service one gets the prompt to install samba:

This is the first hurdle for the standard user. On clicking install, the user will be prompted to the administrator's password. At this point the administrator can take over and enter the password.
Alternately if the Administrator has already installed samba the standard user will not see these prompts.
2. The user is not a member of sambashare group
When samba is installed in the computer the standard user will see the following error message when they try to enable folder sharing.

The key to this error is the last bit, "You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share."
To share a folder (Public or any other) the standard user has to be a member of the sambashare group. This has to be done by the administrator (someone with sudo privileges). Log out as the standard user and log back in as the administrator. Open a terminal and enter the command:
sudo gpasswd -a johndoe sambashare

where johndoe is to be replaced by the user name of the standard user trying to share the Public folder.
Note: the command is gpasswd emphasis on the g . This command will not change the passoword of the user johndoe. This command will add johndoe to the group sambashare.
Next time the standard user logs in, they will almost be able to share the Public folder.
Note2: If the second user is also an administrator (not a standard user) then that user can use the sudo gpasswd command to add themselves to the group. However, the command will not take effect until the user logs out and logs back in.
3. The sambashare "Public" already exists!
When the standard user logs in and tries again they will see a slightly different error message:

If the standard user gets this error, it means another user (may be the administrator) in this computer has already shared their "Public" folder and used the default share name.
The solution is simple. The standard user needs to change the name of the sambashare in the dialog box like so:

Give an unique share name specific to each standard user, so that when someone accesses the "Public" shared folder they know whose "Public" folder they are accessing.
Hope this helps


There are mechanisms in place to switch the version of gcc (and other tools) you get with using their name (gcc), See the update-alternatives man page, but there are recommendations that changing the system-wide gcc default is a bad thing.  Another way, which meets your needs without altering the system-wide defaults is to add the gcc ( and ar, nm, ranlib) links to the desired version into your cuda bin directory, which you should have been placed before the system parts in your PATH.
I just did this for gcc-5 on an older CUDA in 18.04,  with that limit, and it worked.


Newbie 7hours stuck at installation tutorials land

UNetbootin can help you setup a bootable USB, but you you'll need a working USB stick.  Even if there are other ways to boot, like over the network, unless you're familiar with such things this is not what you want.
The best way to setup dual boot is to ensure you have Windows installed first, then install Ubuntu on top of it.  Ubuntu will let you partition the drive and keep the Windows boot, but you will need to use GRUB as your boot loader (the thing that tells the computer which partition to load when you start up).
If you already have a bootable USB but you aren't seeing to load on startup then you need to press some buttons (look it up based on your computer) to select the boot device.  It's probably F12, delete, escape or similar.  You can press F2 and set the boot order from the BIOS, but you'll want to change that back when you're done.


Open a Terminal with Ctrl+Alt+T and type:

sudo apt-get install flashplugin-installer

Alternatively the following command will install all the multimedia plugins and libraries that needed to play mp3 and video formats . This command will install adobe flash player too.

sudo apt-get install ubuntu-restricted-extras


Ubuntu mouse not working well and everything is running slowly on good computer. (i5, 8GB, 7950)

I was using a rat 7 which is apparently super incompatible with Ubuntu. It did however run just fine once I followed advice from this blog which suggests using Compiz Config Settings Manager (ccsm) to make some tweaks and also to use the mouse on a light surface.

I also used this video

create a file and enter the text into it:

sudo nano /usr/share/X11/xorg.conf.d/910-rat.conf

Section "Input Class"
    Identifier "R.A.T."
    MatchProduct "R.A.T.7|R.A.T.9"
    MatchDevicePath "/dev/input/event*"
    Option "Buttons" "17"
    Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 7 6 12 0 0 0 16 17"
    Option "AutoReleaseButtons" "13 14 15"
    Option "ZAxisMapping" "4 5 6 7"
EndSection


Ubuntu 14.04 LTS BCM43142 HP pavilion 14 Wifi strength too weak

I solved it by upgrading my kernel by typing this in terminal: Ctrl+Alt+T.

  sudo apt-get update && sudo apt-get upgrade -y && \
  sudo apt-get autoremove && sudo apt-get autoclean


How to make a script that will make another script in the same folder executable?

When you run a bash script, all of it's commands run in the directory where the script is invoked from, including pwd. For example:

#!/bin/bash

pwd

If you run this from /whatever/path, it will display /whatever/path, no matter where the script is placed.

If you want to operate on files in the directory where you are running the script from, you can omit pwd like this:

chmod +x D3GO

This will be interpreted as chmod +x /whatever/path/D3GO if you run it from /whatever/path, no matter where the script is actually placed.

To operate in the directory where the script is located, you can use the $BASH_SOURCE variable. It is an array, and it's first element is the path to the script itself (i.e. /script/directory/myscript.sh). You can combine this with the dirname command to get just the directory:

chmod +x `dirname ${BASH_SOURCE[0]}`/D3GO

This will look for D3GO in the directory where this script is placed instead of where it's invoked from. (Thanks to @muru for pointing out my mistake.)


You have identified most of the engines ported (at the time of writing) to the full gtk3+ API.

In addition, there is 12.04 KDE support for oxygen-gtk3 (or for 11.10 via kubuntu-ppa-backports)

There is also a gtk3-engines-xfce package in Ubuntu 13.10.

Various references on google report that the development of the gtk3-engines package has ceased - not all the engines in the package were fully ported to GTK3+

For reference only: according to the notes of the gtk3-engines package in the ppa:gnome3-team/gnome3 - these were attempted to made available BUT don't expect these to work fully on oneiric.

Clearlooks, the default GNOME theme, based on Bluecurve;
Crux, formerly known as the Eazel engine;
High contrast, which is used by some accessibility themes;
Industrial, the famous engine from Novell (formerly Ximian);
LighthouseBlue, another engine based on Bluecurve;
Metal, which gives a metallic look;
Mist, a flat and high performance engine;
Redmond95, which provides a look similar to that of Windows;
ThinIce.


Install the connector driver.

sudo apt-get install libmysql-java
The next step is to make sure that the classpath is set. You can have this set automatically by adding this a command to you bashrc file.

export CLASSPATH=$CLASSPATH:/usr/share/java/mysql-connector-java.jar


/dev/sdb is the entire block device, you don't mount this.
You mount a partion that is on the device, example:

sudo mount /dev/sdb1 /mnt

From the first image, it looks as if there are no partitions on the disk any way, or you have recently made some changes to the partiton table and the kernel is not aware of them, so it is best to run

sudo partprobe

after making changes to inform the kernel to take a look at the new partion table.
No need to reboot, just run partprobe.

You mount the partitions on the disk to a mount point somewhere on the root filesystem (/).
Don't mount the disk directly to / , i.e. don't do the below as you'll be mounting over you root filesystem.

sudo mount /dev/sdb1 / #wrong

Typically, you mount to /mnt or /media or a subdirectory within those for temporary mounting; or by creating a dedicated mount point for that device, /data/ is common.

sudo mkdir /data
sudo mount /dev/sdb1 /data

  Also, why does it say 17-May-2015?
  That is the release date for that version of e2fsck.


How can I find out my system's DHCPv6 DUID?

Ubuntu server calls dhclient with a few flags, but mostly default options, and it therefore defaults to a type 1 DUID-LLT DUID.  Ubuntu desktop uses Network Manager which then calls dhclient with a type 4 DUID-UUID DUID.

For servers, it puts it in /var/lib/dhcp/dhclient6.......lease
For desktop, it puts it in /var/lib/NetworkManager/dhclient6.......lease

It's a weird string that looks like:
default-duid "\000\001\000\001\037\305\371\341\001\002\003\004\005\006"

Here's a short script you can use to convert it to a normal hex format duid.
Just run the script like:

./script '\000\001\000\001\037\305\371\341\001\002\003\004\005\006'

The script:

#!/bin/bash

printf $1 | hexdump -e '14/1 "%02x " "\n"' | sed 's/ /:/g'


Which one is the Windows Partition I want to delete in this GParted screenshot?

Be very sure you are not using Wubi (installed Ubuntu from Windows) since your NTFS partition is called /host!!
*And that you are on a Live-CD/USB!*

Both partitions are NTFS; the first one is a "diagnostic" partition from Toshiba, the second one is Windows. You may have to right-click and Unmount the partition in gray before GParted will let you delete it; if there is no Unmount option or you try unmounting and it fails, you are probably using Wubi!


Try:

sudo dpkg-reconfigure tzdata

This should let you update your timezone


I am also experiencing this issue. Apparently the update manager in corrupting local files as per the bug report https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/769817


Failsafe way
They are listed in /etc/passwd. However, this will include "system" users. Generally, "normal" users start with a UID of 1000, so you can filter these out with.
awk -F ':' '$3>999' /etc/passwd

N.B. that I also have a user called "nobody" with UID 65534, so there are some false positives.
Explanation of code

awk -F ':' use awk with field seperator of :.
'$3>999' only print line if the third field is greater than 999.
/etc/passwd read from this file.

Easier way
Most users will have a directory in home. N.B. this may not work if a user doesn't have this directory.
ls /home

(Also, ignore lost+found if it exists, as it's not associated with a user.)


Bluetooth Headphones connect but there isn't any sound. Ubuntu 18.04

I had the same thing happen to me. I went to: Settings -> Sound and selected an output different than the BlueTooth, then selected the BlueTooth output and sound started working. After doing this once, I have not had the problem since.


Ubuntu 16.04, I need to increase swap space?

About the amount of swap you need, see this discussion:
I have 16GB RAM. Do I need 32GB swap?
It highly depends on your usage of the machine.

About how to increase swap memory:
you can use GParted and see from there if you have some unallocated partition that you can use.
If this is not the case, you can also use a swap file.
See here for details:
How to increase swap space?


Booting an installed Ubuntu in an USB from Windows 8.1

Use live Ubuntu and install gparted software and it will mount all the drives as well as microsd card and from there you can format your sd card and it will allocate as free space and then you will to boot another OS.


Can a wine app access files outside of the wine drive_c environment?

Wine manages the drive letters through the ~/.wine/dosdevices directory.  On my system with the default configuration, I have:

$ ls ~/.wine/dosdevices/ -l
total 0
lrwxrwxrwx 1 james james 10 2010-07-21 22:51 c: -> ../drive_c
lrwxrwxrwx 1 james james  1 2010-07-21 22:51 z: -> /

So, the ~/.wine/drive_c folder is mapped to c:, and the root folder is mapped to z: (which means wine programs can access my home directory as z:\home\james).

If I wanted to expose my home directory as h: directly, I could do it as follows:

$ ln -s $HOME ~/.wine/dosdevices/h:


Squid has "sum hash mismatch" errors with bz2 files

I was recently reading an IRC log of a conversation between one of squid's authors and one of the Ubuntu archive admins and I believe there are actually issues with the way the archive sets the 'Expires:' header which sometimes causes this problem. It should not ever be a problem with the released version of Ubuntu, so it will only be a problem with -updates/-security and with the current dev release. Basically what happens is squid gets the Packages.bz2 from one mirror, and then later it is updated but your cache doesn't get it, leading to files missing or what appears to be a corrupt Packages.bz2.


If over heating is repeatedly happening, for 90% it means you have a malware consuming most of your comp ressources and results in a considerable over heating. Run malware scan with malwarebyte or eset internet security which I trust the most for its advanced AI detection. The scan should be done offline to avoid malware connection to its server. Another way to check this out, is to use your comp offline(not attached to network) : lauch 3 heavy softwares and let your comp running for 1 hour. If its not over heated, then its a 100% sign of malware. Else, it could be that your comp fan flooded with dust and not running any more, you have to clean it. If you do not have the requested knowledge to do it by your self, I advise you to bring it to IT repairing store.


My ubuntu (14.04.02 LTS) doen't recognize my graphic card

Visit http://support.amd.com/en-us/download

Answer the questions 1 through 4 and choose display results. Then download the appropriate packages. Install both the 32 bit and 64 bit drivers for your system as the chip manufacturer insists this is required.

Note: the Radeon R7 265 (codenamed PITCAIRN) is just a slightly overclocked version of the Radeon HD 7850

You may need some additional files:

open a terminal and issue these commands:
since you are running 14.04.2 and are affected by this bug which is posted as a status of in progress. You should add yourself to the list, letting the developers know that this bug effects you too.

The workaround that has been known to work is

sudo apt-get install libcheese*

sudo apt-get install xorg-core

then
sudo apt-get install fglrx-updates

sources for this final bit.
http://ubuntuforums.org/showthread.php?t=2266268&page=3
http://ubuntuforums.org/showthread.php?t=2266268&page=4
http://packages.ubuntu.com/eo/trusty/xorg-video-abi-15


Is there any support whatsoever for the ART Tube MP Project Series w/USB?

The Linux Audio Users mailing list would be a good place to ask.

http://lad.linuxaudio.org/subscribe/lau.html


Dropbox disappears from Startup Applications upon reboot in Ubuntu 16.04

To add dropbox to your startup, copy /usr/share/applications/dropbox.desktop to $HOME/.config/autostart/dropbox.desktop.

The next time you login, dropbox will be started.


You need to install the package gnome-screensaver

sudo apt-get install gnome-screensaver

This is because, when GDM is not running, gnome-screensaver is used to deal with the screen whilst it's locked. GS crashes when neither of the two are available.


There is a Tutorial that shows how to adjust the position of Notify Tweaking Notify-OSD, incl. GUI for Placement, all Ubuntus The default version of Notify-OSD still doesn't support any kind of configuration. So, this is an update on the available PPAs and the new features added to the patched versions of it. I will also show how to configure it, and introduce here a GUI to change its position I wrote earlier.


Set read and write only permission (with no delete!) vsFTPd

To do so you would simply have to remove the following from the config:

# Disable delete commands
cmds_denied=DELE,RMD

Where DELE is delete file permission and RMD is remove directory permission.

Taken from this question on serverfault as suggested in the comments by @Pretenderus.


How to make a file (e.g. a .sh script) executable, so it can be run from a terminal

You can mark the file as executable:

chmod +x filename.sh

You can then execute it like this:

./filename.sh

If you want to use a different command to start it, you can add an alias:

gedit ~/.bashrc

Add this at the end of the file:

alias <new name>='/home/<full path to script>/filename.sh'

Open a new terminal session or type source ~/.bashrc in your terminal to apply.
Then simply use the new name to start the script.


VMware crashing when gnome extensions is enabled

From the comments...

You've got a GNOME extension problem.

Disable only one GNOME extension at a time to determine which one is causing your problem. If you provide a list of installed/enabled extensions, maybe I can help identify a bad one. Go to https://extensions.gnome.org/local

Update #1:

It's GSConnect and kdeconnect causing the problem. Remove the extension, and manually uninstall kdeconnect.


It seems as though I had somehow lost sudo on my account, but it degraded over time. It just was not there anymore. So I figured out how to do recovery mode in Ubuntu 14.04. 95% of what is out there says click or hold the shift key to access the grub menu, but this is not the case with me. It took me a whiiiile to discover that hitting the ESC" button, once, after BIOS is what does it for me. This appears to be a bug or a very bad idea in UBUNTU to allow different ways to access a certain functionality.

I was able to access grub, run recovery linux-image, then drop to root. I then ran mount -o rw,remount, then adduser myusername sudo.

Once I rebooted, GUI authentication worked fine again.

Again, I have no idea how I lost sudo....seems to me if the system will allow actions that would remove sudo from the last account with admin access, there would be some SEVERE warnings and multiple notifications. But there was not. I had no idea.


Ubuntu 16.04 LTS Network Manager cannot add VPN - greyed out

In case anyone else has this issue, the wording "Add A VPN Connection" is super misleading as it's telling you that you need to add a VPN connection, not that you are supposed to click to add one from there.

So select Edit Connections, Add, and then select your VPN from there.


I only had the normal gtk3 files installed, not the developement files needed for cmake to make use of:

sudo apt-get install build-essential libgtk-3-dev


How to find correct driver for updating NVIDIA on Ubuntu16.04 LTS?

Ubuntu 16.04
Ubuntu 16.04 has less drivers available than 18.04.
With a quick search at https://packages.ubuntu.com/. I found that the latest driver available was nvidia-384.
Using the official LTS packages, nvidia-384 is the newest driver you can install.
However, driver 440 is available at https://www.nvidia.com/en-us/drivers/results/159360/ (Apr 07, 2020).

This download is not a package but an installer that will verify your system for compatible drivers and should install the latest version.
The installer is run through the terminal.
Note: You may need to change the file permissions with `chmod u+x filename' and then execute.
Ubuntu 18.04
As ubuntu 18.04 already has updated drivers I offer a
GUI and terminal installation:
Option 1: Graphical User Interface (GUI) method
Get to the so called Additional Drivers window. This is a tab inside an application called Software and Updates. Bellow example on how it should look like.
Note: I recommend selecting the latest nvidia-driver-440 (as of May 30, 2020 for ubuntu 18.04) unless you have specific need for a different version. I am using an SDK that requires the use of proprietary driver 435.

Option 2: Bash Terminal
In a new terminal window, find current available drivers with command
apt-cache search nvidia-driver

Only worry about the drivers that begin with nvidia-driver. In the example about the newest driver would be nvidia-driver-440.
Install the driver (will require root privileges) sudo apt-get install nvidia-driver-###. Replace ### with the respective number found in your search 440 for my example.
Reboot computer
The computer should require a reboot let the video driver changes take effect.


How do I whitelist some connections by ip from being dropped by connlimit?

First , you have not provided sufficeint information for us to give you a specific answer.

Second, those are ufw rules. ufw is a front end for iptables and you can manage the rules from the command line, ufw or a graphical interface, gufw.

Using iptables directly will conflict with your ufw rules, so use one tool or another.

You need to post your ufw rules. In general you are going to allow your local network prior to the rules you posted. How are you managing your ufw rules? command line? gufw?

for ufw, something like this

sudo ufw allow from 192.168.0.0/24

See also:

http://blog.bodhizazen.com/linux/firewall-ubuntu-servers/

https://help.ubuntu.com/community/UFW

and for iptables http://bodhizazen.com/Tutorials/iptables


Formatted my windows drive by mistake and now windows installation cannot find drives

If you have no data on the hdd (which seems to be the case) do the following. Please note that any and all existing data on the drive will be destroyed after executing the following list.

Boot from a live cd
Open console (terminal)
type sudo -i (you should become root here)
type dd if=/dev/zero of=/dev/sda bs=2M count=100
fire up gparted and split the disk into 3 parts

500mb primary partition (service partition for windows)
windows partition
linux partition

do not format the partitions
Start your windows install and let it format the partitions itself (the first 2 only)
Now install linux


How to logout of Ubuntu One using OAuth URL?

There isn't currently an API to allow applications to invalidate the OAuth tokens they have requested.

Users can revoke any tokens they have issued from the following URL though:

https://one.ubuntu.com/account/

The Devices section of the page will have an entry for each token that has been issued.  Clicking the Remove Device button next to the relevant token will revoke access.


Gnome Documents unable to open documents!

Do you have a /etc/mime.types file?
Do you have a /usr/share/applications/defaults.list file?
Do you have /usr/share/applications/...  .desktop files for every application that can open a document?
Do you have /usr/share/mimelnk/application/libreoffice_... .desktop files? (if you use LibreOffice)
Run

sudo update-desktop-database

In the right corner of GNOME Documents, there's an icon with a gear. If you click it wile laoding, you will see: Open document with...


How does one undelete or repair BTRFS partitions?

Figure out what files are missing ( if any -- the free space simply may have been wrong before ), and restore them from backup.

If you don't have a backup, then sooner or later you are going to lose your data, especially if you store it on an experimental filesystem like btrfs.


How to dual boot Ubuntu+Windows 10 in HP ProBook?

Ok. I faced same matter when i was a beginner. This is something wrong when you creating the boot drive. What is shown in your image is the content of the usb. Literary Rufus is not a very good tool for creating bootable drives for linux. So try another software like balena Etcher. You can download windows version the website.  You Can Go To Website Using This Link


Use the rw option to enable read/write access. This would make your command mount -t cifs -o rw,username=myuser,domain=ad009,uid=myuserid,file_mode=0777,dir_mode=0777,gid=1001 //windowsShearedDrive/data/OF /home/myuser/of This should work, assuming your user has write permissions on that samba share.


Gnome Terminal window is stuck on top but not really there

Pressing Alt + F2 to bring up the run dialouge, and running the command r fixed the issue:


Installing textext-0.4.4 in Inkscape 0.91

The extension was accessible only by root. Correct this access rights via

sudo chown $USER:$USER ~/.config/inkscape/extensions/*


In the Additional Drivers tab you see these three options:

nvidia-310: nvidia proprietary driver in the version available when your Ubuntu version was first released

nvidia-310-updates: nvidia proprietary driver in latest version available from the "updates" repository. If a new nvidia driver will be available in the next 9 month (support time for your Ubuntu 13.04) there is a good chance that it'll be installable through this option.

nouveau: open source version of the nvidia driver. This is default option because of its opensource license.

I advise you to choose "nvidia-310" for now.


Juju does not support MAAS2 until 2.0.0 beta 7.


If you don't own a NAT64-gateway, try to use one of the public gateways:

A list is here:

some public DNS64/NAT64 gateways

The use is quite simple:
set your DNS-resolver to one of the entries of list, for example 2001:67c:27e4:15::6411.

The classic way would be to edit the /etc/resolv.conf

If you are using some DNS-helpers, you may adjust the value at a different place.


How can I launch a systemd service at startup before another systemd service starts?

The reason you are having this problem is because you are using After= while you also need Requires= or Wants=.
There are 3 main properties for managing dependencies. I'll try to briefly explain the difference but you can find more details at [Unit] Section Options | freedesktop.org

After=
This option only sets the order of the units, it doesn't guarantee that the service has finished starting up.

Wants=
This option allows your unit to start only after another unit has finished starting up. (Doesn't matter if it started successfully or not)

Requires=
Just like Wants=, however, this will make your unit start only after the dependencies have successfully started.

You can also use the inverse of each of those options.

After= is inversed by Before=
Wants= is inversed by WantedBy=
Requires= is inversed by RequiredBy=

To fix your problem, you need to change your mount service to:
[Unit]
Description=MountSmokeScreen
After=network.target
Before=sonarr.service radarr.service

[Service]
Type=oneshot
ExecStart=/home/samsepioldoloresh4ze/bin/check.mount
TimeoutStopSec=20
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target sonarr.service radarr.service

Or you can add Wants=mountgdrive.service to the sonarr.service and radarr.service units.
You can do that without modifying the default files by running the following (You need to do the same for radarr.service):
systemctl edit sonarr.service

And insert the following:
[Unit]
Wants=mountgdrive.service

Note: You can replace Wants= with Requires or WantedBy= with RequiredBy= if you don't want the two services to start at all if mountgdrive.service fails (Though Wants= is usually enough and even recommended in the docs).
EDIT: The WantedBy and RequiredBy options can only be used under the [Install] section. (Thanks @Yankee)


How can I downgrade GCC to version 6 on 20.04?

Ubuntu 20.04, gcc-6

Please do not remove / change the system gcc : You can have as many gcc versions as you want, installed at the same time.
Add (temporarily) a line to /etc/apt/sources.list :

apt [url] bionic main universe, and do

sudo apt update
sudo apt install g++-6

My test : {gcc-6, g++-6} was installed OK.

Using extra compilers, examples : export CC=gcc-6 CXX=g++-6 && ./configure and make CC=gcc-6 CXX=g++-6

Other (non PIE) extra compilers for Ubuntu https://drive.google.com/drive/folders/1xVEATaYAwqvseBzYxKDzJoZ4-Hc_XOJm?usp=sharing


The following thing did it for some reason.

It seemed like the problem was a gimp-data 2.7 package, that was still installed after I removed the ppa ppa:matthaeus123/mrw-gimp-svn .

After I removed this package and then removed the ppa:matthaeus123/mrw-gimp-svn it installed gimp 2.6 immediately.

I tried to add the ppa again (to install 2.7, because I made a file with that and need to open it - which doesn't work with 2.6), but always got an error about a missing libbabl.0.so.0 file (although it was installed).

I also tried this ppa which I stumbled upon:
https://launchpad.net/~alex-p/+archive/notesalexp-oneiric

I also checked the list of sources when I do an apt-get update, but it's not even in there.

At least I have one gimp.

But if somebody knows a trick that is worth trying, I'd love to hear it.
(it has gimp 2.73 in it, but when I add it and also activate it nothing happens)


Grub menu doesn't appear on HP Z220 Workstation

Boot-Repair is a little tool that solves most boot issues on Ubuntu.
Launch it from a live disk (CD or USB), and click the "Recommended Repair" button.
See https://sourceforge.net/p/boot-repair

(if any further issue after its use, indicate the URL it will provide)


Trying to install Ubuntu on partitioned HD

It is suggested to install windows os first because they will overwrite important bits like the MBR.https://help.ubuntu.com/community/WindowsDualBoot


How do I open deja-dup during a current backup?

first install xdotool if you didn't do yet.

sudo apt-get install xdotool

Now specify the PID of the deja-dup backup process.

ps aux | grep deja
user  32052 18.5  0.1 1166992 33240 ?       Sl   13:31   0:00 gnome-control-center deja-dup
user  32073 11.5  0.0 744364 19704 ?        SNl  13:31   0:00 deja-dup --backup
user  32100  0.0  0.0   9452   944 pts/2    S+   13:31   0:00 grep --color=auto deja

save the PID  of the --backup process which is 32073 for this example

Now use the xdotool

xdotool windowactivate `xdotool search --pid PROCESS_PID | tail -1`

In this example means

xdotool windowactivate `xdotool search --pid 32073 | tail -1`

and this will bring back the deja-dup backup window so you can do what you want.


Temporarily disable Automatic Screen Lock?

What is the smartest way to temporarily disable the Automatic Screen Lock function?

Use the method from the link you used for the CLI way so ...

gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'
gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'

  My idea is to use anacron to set it to enabled every day.

The easiest method to me would be using the at command. at is set up such that you can words to explain when it should be executed and consists of 3 commands:

at : execute commands at specified time.
atq : lists the pending jobs of users.
atrm : delete jobs by their job number.

at can use words like:

noon
midnight
teatime
tomorrow
noon tomorrow
next week
next monday
midnight
now + 2 days
4 PM + 2 days

So

echo "gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'" | at 9:00 AM

would lock the screen at 9 am.

 echo "gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'" | at midnight

would unlock it at midnight.

You can put a whole array of these commands in a script and call that script from cron (/etc/crontab with the @reboot method), on boot (/etc/rc.d/rc.local) or on login (~.bash_profile) or from anacron.


Firefox fonts unreadable, especially for Google sites

I found a solution to my problem, documented here:
14.04 Thinkpad T450: Text getting messed up on large screens

Specifically:

Put the following:

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "uxa"
EndSection

in file /etc/X11/xorg.conf.d/20-intel.conf, create the directory /etc/X11/xorg.conf.d/ if it does not exist. This must be done as root:

$ sudo mkdir /etc/X11/xorg.conf.d/
$ sudo cp  20-intel.conf /etc/X11/xorg.conf.d/20-intel.conf

Assuming you created the file 20-intel.conf in the local directory.

BTW, here's the source for the solution: https://wiki.archlinux.org/index.php/Intel_graphics#SNA_issues

The problem with disabling SNA is that some graphic-intensive applications like a video Google Hangout are extremely slow.

The other workaround is documented in post #100 on https://bugs.launchpad.net/xserver-xorg-video-intel/+bug/1432194 - it worked allright on my 14.04.


i found a workaround for this problem in my Ubuntu installation (14.10).

Type the following command in terminal, now you will be able to rename files in UI.

$ nautilus


How can I only extract lines from a file if column 1 occurs at least n- times?

awk with help from process substitution (<()), sort, and uniq:

awk 'NR==FNR{a[$0]; next} {for (i in a) if ($1==i) {print}}' \
      <(awk '{print $1}' file.txt | sort| uniq -c | awk '$1 >= 5 {print $2}') file.txt

awk '{print $1}' file.txt | sort| uniq -c | awk '$1 >= 5 {print $2}' gets the first fields where the content occurs greater than or equal to 5 times. The command substitution, <(), replaces the STDOUT with a file descriptor, which is passed as the first argument to the main worker awk process, with the original input file as second
NR==FNR{a[$0]; next} creates array a with the elements from first file (NR==FNR) as the keys
{for (i in a) if ($1==i) {print}}' prints the lines from file.txt that have the keys from the array a as the first field

The obvious caveat is that this approach is reading the file twice, which might not be the optimum solution for a large (in the usual definition) input file, where high speed and/or low resource usage is expected.

Example:

% cat file.txt
realism:::N     1.33    depth:::N               3.11    341
realism:::N     1.33    problem:::N             2.68    335
realism:::N     1.33    now:::ADV               1.48    335
realism:::N     1.33    life:::N                2.69    334
renowned:::ADJ  1.41    be:::V                  1.85    15760
renowned:::ADJ  1.41    internationally:::ADV   2.23    9134
renowned:::ADJ  1.41    world:::N               4.36    6736
renowned:::ADJ  1.41    most:::ADV              2.38    5482
reverent:::ADJ  1.5     use:::V                 2.78    25
reverent:::ADJ  1.5     sacred:::ADJ            1.77    25
reverent:::ADJ  1.5     music:::N               4.31    25
reverent:::ADJ  1.5     devout:::ADJ            2.46    25
reverent:::ADJ  1.5     devotion:::N            2.36    25

% awk 'NR==FNR{a[$0]; next} {for (i in a) if ($1==i) {print}}' <(awk '{print $1}' file.txt | sort| uniq -c | awk '$1 >= 5 {print $2}') file.txt
reverent:::ADJ  1.5     use:::V                 2.78    25
reverent:::ADJ  1.5     sacred:::ADJ            1.77    25
reverent:::ADJ  1.5     music:::N               4.31    25
reverent:::ADJ  1.5     devout:::ADJ            2.46    25
reverent:::ADJ  1.5     devotion:::N            2.36    25


What is /boot/firmware? What is it used for?

Is it Raspberry specific?

Yes. Sort of. The files to me are more important and are indeed for a PI installation. /boot/firmware is not a default Linux directory.
Regarding the content: see raspberrypi's topic on "boot":

start.elf, start_x.elf, start_db.elf, start_cd.elf, start4.elf, start4x.elf, start4cd.elf, start4db.elf
These are binary blobs (firmware) that are loaded on to the VideoCore in the SoC, which then take over the boot process. start.elf is the basic firmware, start_x.elf includes camera drivers and codec, start_db.elf is a debug version of the firmware, and start_cd.elf is a cut-down version with no support hardware blocks like codecs and 3D, and for use when gpu_mem=16 is specified in config.txt. More information on how to use these can be found in the config.txt section.
start4.elf, start4x.elf, start4cd.elf, and start4db.elf are firmware files specific to the Pi 4.

Some other files are listed too.


In short, the driver version in Ubuntu 14.04 doesn't yet cover your very new wireless device.

You are in the classic dilemma, a very new device with an older kernel version, 4.4.0-xx, and its associated driver. While it is possible to search and find by trial and error, a downloadable, compilable from source code driver and install it, it is much easier to download the iso for Ubuntu 18.04 LTS which contains the later 4.15.0-33 kernel and linux-firmware and for which I confirm covers your 8086:a370 device.

http://releases.ubuntu.com/18.04/

Try the live session USB or DVD and when you’ve confirmed that the wireless works as expected, install it.


zip multiple folders into a zip file using terminal

The syntax is the other way around; you give the name of the .zip file to create first in the list. Also, use the -r flag for recursion into directories:

zip -r wordcount.zip META-INF org

This creates a file wordcount.zip (you may be able to omit the .zip in the command as this is automatically added if possible) with all the contents of the two directories META-INF and org


Found out that the live image lacks the required RAID drivers that are required to see the drives on a system using the Intel Rapid Storage Technology. In order for me to actually get this installed, I had to wipe all the drives, including the 32GB ssd, reinstall Windows, then Ubuntu, then install the Intel Rapid Storage Technology in Windows to get that working again. Quite a pain...


Start service autamatically on startup at Ubuntu

use enable

sudo systemctl enable NetworkManager.service


Ubuntu won't boot ufter upgrade to 15.04, stuck on gnome display manager

Visit this question and do the steps that I mentioned in the answer, please post back any messages for further info/help!


Terminal closes immediately after trying to change shell script back to bash

Managed to solve this myself. Allow me to explain:

I went to virtual console with ctrl + alt + F1 then tried logging in there, but same issue happened, I was a quick message pop up and I was back to login stage in the virtual console. The message went by way too fast so but I managed to grab it my camera.

It turns out it was an error with fish shell: (not exactly sure if how I caused this error)

fish: relocation error: fish: symbol _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7reserveEm, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference

So this told me that fish shell was still my default shell script sudo chsh -s /bin/bash did not do the trick for me. I was able to further confirm this by checking /etc/passwd and saw that my user still has /usr/bin/fish and fish was broken somehow which caused the terminal to immediately close. Finally found the root of the problem!

I then proceed to edit my passwd file by running bash from grub as root following instructions from here: https://unix.stackexchange.com/a/282141/212011 where I simply find the line with my username and changed /usr/bin/bash back to /bin/bash and then it was all good again!


Please help me in installing Ubuntu 12.04.1. and Can it run MS Off. Prof. Plus 2007?

Yes you can...

You can install MS Office 2007 in Ubuntu with a addition software called Wine or Play On Linux. An office package called Libre Office comes with Ubuntu 12. I think Libre Office is better than Microsoft Office. It's simple and classic.


I am tryng to dual-boot Ubuntu 11.10 and Fedora 16

Personally, I would install Fedora first because its installation is much more difficult than Ubuntu's installation. Ubuntu will also set everything for you. You do not need to create a separate partition as a boot partition. Just install fedora and when you install Ubuntu choose the "install alongside fedora (or other linux distribution)" and Ubuntu will do the rest.


Grub2: Please explain me what does this command do?

1.boot=casper

From its man-page

  Casper  is  a  hook  for  initramfs-tools used to generate an initramfs
         capable to boot live  systems  as  those  created  by  make-live.  This
         includes  the  Debian-Live isos, netboot tarballs, and usb stick images
         and Ubuntu live cds. At boot time it will look for a (read-only)  media
         containing  a  "/casper"  directory  where  a root filesystems (often a
         compressed squashfs) is stored. If found, it  will  create  a  writable
         environment, using unionfs, for debian like systems to boot from.

2 .  For the second A very good information like with examples from ubuntu grub community and menuentry details.


The alternative way was found in the blog post: http://www.jotschi.de/?p=755


Ubuntu server 14.04 kernel panic at boot

I had this same issue with when I upgraded my Ubuntu server from 12.04 to 14.04. It's caused by a bug in the kernel, and a fix was released today. You should be able to fix it with

sudo apt-get update
sudo apt-get dist-upgrade


How to edit startup applications from recovery mode?

From recovery mode, you can manualy remove the entry by deleting the file in the startup directory: /etc/xdg/autostart/


SCP to multiple servers using key pair authentication

I have a similar use case where I want to fully automate commands over ssh where there is an interaction that can be automated .  I've automated using python and use pexpect to answer questions (which could be passphrase)
def localexpect(alog, config, host):
    TMPLOG = "/tmp/pexpect.log"
    mcs = config["mcs"]
    cmd = f'''
ssh-keygen -R {host}.local ;\
ssh-copy-id -i rsa/id_rsa.pub {mcs["user"]}@{host}.local ;\
echo "publickeyinstalled" ;\
echo "alldone"
        '''

    alog.info(cmd)

    with open(TMPLOG, "w") as log:
        ch = pexpect.spawn(f"/bin/bash -c \"{cmd}\"", encoding='utf-8', logfile=log)
        while True:
            i = ch.expect(["Are you sure", "password:", "publickeyinstalled"])
            if i == 0:
                alog.info("ECDSA check")
                ch.send("yes\r")
            elif i == 1:
                alog.info("Password required")
                ch.send(f"{mcs['pwd']}\r")
            elif i == 2:
                alog.info("public key installed")
                break
        ch.expect("alldone")
        i = ch.expect([pexpect.EOF], timeout=5)
        ch.close()
        alog.info("expect done - EOF")


Alright, I found the solution! The always trusted Debian saved me. I leave it here for people with the same trouble.

I added the repositories from Debian Sid (I believe the same version fo packages is in Debian Stretch):

deb http://http.us.debian.org/debian unstable main contrib non-free

to the /etc/apt/sources.list

Then obviously

sudo apt-get update

Then I went on synaptic and got rid of the following packages:

Removed the following packages:
ubuntu-desktop
xorg
xserver-common
xserver-xorg
xserver-xorg-core
xserver-xorg-input-all
xserver-xorg-input-evdev
xserver-xorg-input-synaptics
xserver-xorg-input-vmmouse
xserver-xorg-input-wacom
xserver-xorg-video-all
xserver-xorg-video-amdgpu
xserver-xorg-video-ati
xserver-xorg-video-fbdev
xserver-xorg-video-intel
xserver-xorg-video-nouveau
xserver-xorg-video-qxl
xserver-xorg-video-radeon
xserver-xorg-video-vesa
xserver-xorg-video-vmware

Then installed, with the latest version which is the one coming from Debian:

Upgraded the following packages:
libgcrypt20 (1.6.5-2ubuntu0.2) to 1.7.6-1
libinput10 (1.2.3-1ubuntu1) to 1.6.0-1
libwacom-bin (0.18-1) to 0.22-1
libwacom-common (0.18-1) to 0.22-1
libwacom2 (0.18-1) to 0.22-1

Installed the following packages:
libinput-bin (1.6.0-1)
libxcb-util0 (0.3.8-3)
libxfont2 (1:2.0.1-3)
xfonts-100dpi (1:1.0.4+nmu1)
xfonts-75dpi (1:1.0.4+nmu1)
xorg (1:7.7+18)
xserver-xorg (1:7.7+18)
xserver-xorg-core (2:1.19.1-4)
xserver-xorg-input-all (1:7.7+18)
xserver-xorg-input-libinput (0.23.0-2)
xserver-xorg-input-synaptics (1.9.0-1+b1)
xserver-xorg-video-all (1:7.7+18)
xserver-xorg-video-amdgpu (1.2.0-1+b1)
xserver-xorg-video-ati (1:7.8.0-1+b1)
xserver-xorg-video-fbdev (1:0.4.4-1+b5)
xserver-xorg-video-intel (2:2.99.917+git20161206-1)
xserver-xorg-video-nouveau (1:1.0.13-1+b1)
xserver-xorg-video-qxl (0.1.4+20161126git4d7160c-1)
xserver-xorg-video-radeon (1:7.8.0-1+b1)
xserver-xorg-video-vesa (1:2.3.4-1+b2)
xserver-xorg-video-vmware (1:13.2.1-1+b1)

And finally added the remaining packages:

Installed the following packages:
ubuntu-desktop (1.361)
xserver-xorg-input-evdev (1:2.10.5-1)

There are two packages that were removed and I could not substitute with Debian versions: xserver-xorg-input-vmmouse and xserver-xorg-input-wacom. But I personally don't need them since my laptop is not a Wacom tablet and I don't intend to use VMWare (I like VirtualBox better).

I hope it helps someone

Edit: Of course, this goes without saying, disable the Debian repositories after doing this... I am using heir repos to fix a bug, not for my everyday life. If I wanted to have the headaches that Sid gave me 10 years ago I would have installed Debian Sid...


wlan0 is not permanently turned down by ifconfig

You most probably use network-manager, try nmcli nm wifi off.


On desktop environments, using wireless connections, or using VPN, I'd recommend staying with NetworkManager.

VPN connection scripts can be automatically launched at connection time by using nm-connection-editor.

The /etc/netplan/*.yaml file should look like this...

network:
  version: 2
  renderer: NetworkManager

sudo netplan --debug generate # make config files

sudo netplan apply # apply configuration

reboot # reboot, and check operation


How to view text files on Launchpad raw?

You can't view raw files directly in the browser; you can however download them.

For your specific example: download file.


i am unable to install java on my machine please someone help me out

Go to Ubuntu Software Center and search for "OpenJDK Java 7". That's what I'm using and it has worked flawlessly for me so far!


How to remove bandwidthd 32 bit from 64 bit Xubuntu

SOLVED using tips from ptheo:

sudo -H gedit /var/lib/dpkg/status

then remove all segments mentioning the culprit.


How to clear recently used files without using a terminal?

It depends on whether you're using Unity or the Classic desktop.

In Unity, the recent documents that you see in the Files lens are logged using Zeitgeist. If you don't want to use the terminal to remove these, or only want to remove a few of them, the best thing to do is install "Activity Journal" using the Software Center. Fire up the Activity Journal, and you'll see all your recently used apps and documents, grouped by day. If you right click a document and click "Delete item from Journal", Zeitgeist will forget that you used that document at that specific time. If you click "Delete all items with this URL", Zeitgeist will forget you ever used that document. If you want to delete everything, this terminal command (which others have already posted) will do the job:

rm ~/.local/share/zeitgeist/activity.sqlite
zeitgeist-daemon --replace

There's a Zeitgeist Global Privacy app in development which will make this easier, but unfortunately it's not released yet.

The Classic desktop (and the lists of recently used files in most applications' File menus) stores a record of your recently used documents in ~/.local/share/recently-used.xbel. You can just delete this file using the file manager or copy and paste the following code into a terminal:

rm ~/.local/share/recently-used.xbel

Hope that helps!


Yes. Run:

ntfsfix /dev/sdxx

This command comes from ntfsprogs.

Do be warned (from the man page):

  ntfsfix is a utility that fixes some common NTFS problems. ntfsfix is NOT a Linux version of chkdsk. It only repairs some fundamental NTFS inconsistencies, resets the NTFS journal file and schedules an NTFS consistency check for the first boot into Windows.

(emphasis mine)


Bluetooth mouse paired and connected but pointer not moving

I Just had a similar issue with my microsoft bluetooth mouse 3600 so maybe my solution will work for you. My mouse worked fine for months, then I formatted and reinstalled ubuntu and it just refused to work. I tried switching my intel 7265 out for an 8260, I tried manually disconnecting and reconnecting the mouse from the command line with bluetoothctl. It would connect but the cursor wouldn't move.

Then I finally worked out I had to connect things in a specific order (I have a Logitech Bluetooth audio adapter). I disconnected everything, connected the BT mouse first, then connected the Logitech BT audio adapter second. Now everything works.


grub issue due to removal of windows partition

You should be able to boot from any linux distro live cd eg. Ubuntu and then mount the partitions and install grub (XY will be different in your case):
sudo mount -t ext4 /dev/sdXY /mnt

if you need to see how to mount other filesystem please see :
man mount

mount your filesystem and bind to the directories
sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys

change the root :
sudo chroot /mnt

Now your can run install and update grub using (name sdX should be different in your case) :
grub-install /dev/sdX
grub-install --recheck /dev/sdX
update-grub

Now exit chroot, unmount and reboot and it should work.


Cache directories fortunately should be expendable. Reinstalling the related packages should bring them back. The problem is /var/cache/apt as you need it for installing.

So let's recreate it manually:

sudo mkdir -p /var/cache/apt/archives

Now you can reinstall packages. On a default installation, these packages own directories in var cache, and this is how you reinstall them:

sudo apt-get install --reinstall cracklib-runtime cups debconf \
    dictionaries-common lightdm man-db nscd pm-utils pppconfig \
    samba-common software-center

The only thing I'm not sure about is whether debconf will run without the files in /var/cache/debconf. But try it!


This app got updated a few days ago. As such, it might be a bug.

Workarounds:

If you use it all the time, then do not close it at the end of your session and it will start automatically in your next session (at least it works for me, in Xubuntu 14.04).
If you do not use it all the time, then create a file to run after you login. Create a .desktop file with the following content:

[Desktop Entry]
Name=Start MEGAsync
Exec=megasync
Type=Application
Terminal=false

Save this file where all your post-login startup files are stored: ~/.config/autostart. Now, it will start every time you log in.


How to remove transparency from a GTK theme?

From your screenshot - perhaps just double check that you haven't got your opacity of popup windows slightly transparent (assuming you are using the default compositor)


Broadcom USB Bluetooth adapter not working

The problem seems to be motherboard-related. Only the USB 3.1 ports on the rear panel the motherboard seem to make this dongle work correctly - all other ports results in the errors above.


Apt-get could not open lock - permanently

The problem

When the system is starting, Ubuntu checks for new security (and sometimes regular) updates. That can take a little while. While it checks, other Apt-related actions are prevented.

How to stop automatic checks for updates

It's not recommended to do this because it stops automatic installation of security fixes if you have those turned on, and it will prevent Ubuntu from telling you when there are updated software packages, but you can stop it from doing that:

Run the System Settings application
Go into Software & Updates
Go to the Updates tab
Switch Automatically check for updates to Never


How can I recover files inside a Wubi install before re-installing Ubuntu?

When you try to boot a Wubi install and you end up at a grub> prompt, then most likely it's the result of corruption. Wubi installs Ubuntu on a large virtual partition that is a single file called the root.disk (if you install on a FAT32 partition, other .disk files are created as well).

To confirm it you can run the bootinfoscript and you'll see something like:

sda1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files:        /bootmgr /Boot/BCD /Windows/System32/winload.exe
                       /ntldr /NTDETECT.COM /wubildr /ubuntu/winboot/wubildr
                       /wubildr.mbr /ubuntu/winboot/wubildr.mbr
                       /ubuntu/disks/swap.disk

You can see it lists /ubuntu/disks/swap.disk, but it's also supposed to show /ubuntu/disks/root.disk.

If this happens, the first thing to do is to boot Windows and run chkdsk /f or chkdsk /r (the latter also looks for damaged disk sectors). This will repair any NTFS file system corruption and sometimes fix the damaged root.disk file (but not always).

Here's how to do it from Windows 7. Go to Computer, right click on the "drive" you selected when you installed Wubi e.g. C:\, and select Properties, Tools, Error-checking Check now, and then Start:

If you installed Ubuntu on the C:\ "drive", then you have to reboot Windows to let chkdsk complete. Make sure you don't hit any key at bootup or it will cancel the scan.

Now comes the tricky part. Sometimes Windows will remove the repaired file to a hidden folder called \found.000 or \found.001 (it increments). And in most cases the file name will be lost, so you'll see a file called file0000.chk inside there. In this case you want to look for a file that's about the size of the root.disk (at least 5GB and up to 30GB). You can move that back to \ubuntu\disks\root.disk and you should be good to go. If the entire \ubuntu\disks directory is repaired, then instead you might see a directory \found.000\dir0000.chk and inside that you may find root.disk and swap.disk. In this case, move the directory back, renaming it to disks.

Here is how to do it... hit the Windows key + R, type cmd, look above and right-click on CMD.EXE, and select Run as administrator. Then from the command like:

C:\>cd \found.000
C:\found.000>dir
 Volume in drive C is OS
 Volume Serial Number is B4B7-99A8

 Directory of C:\found.000

19/07/2011  02:02 PM    15,000,000,000 file0000.chk
               1 File(s)              8 bytes
               0 Dir(s)  222,258,069,504 bytes free

C:\found.000>move file0000.chk \ubuntu\disks\root.disk
        1 file(s) moved.

or if the whole disks folder is recovered

C:\found.000>move dir0000.chk \ubuntu\disks
        1 dir(s) moved.


How to stop 16.04.2 with HWE kernel from updating to 4.4 kernels

I encountered this this morning, fortunately I stopped it before it installed the new kernel.  The HWE instructions should have covered this IMHO.

To prevent future problems of this nature, just delete the linux-generic entries.  Until you do this, you will have two sets of packages that can be updated with different kernels.

sudo apt remove linux-generic linux-headers-generic linux-image-generic

Future kernel updates will come through the linux-generic-hwe-16.04 package.


Using a live cd of Ubuntu (or any other distribution, most probably) you can use gparted (sometimes called "gnome partition editor", found in the system/administration menu of the classic desktop) to resize the ubuntu partition to something smaller and then resize the windows partition to take up the space you just freed.

(By the way, you can't use gparted from inside ubuntu because you want to resize the partition you are currently using. That's why i proposed the live cd. You can also use gparted's own live cd , if you don't have an ubuntu one. It can be found here http://gparted.sourceforge.net/download.php)

You can find more info on gparted's documentation (here, for example http://gparted.sourceforge.net/larry/resize/resizing.htm) but the whole thing is pretty self-explaining once you are in front of gparted.


When will the applications submitted to the Ubuntu App Showdown be available for download via the Software Centre?

When all applications has been reviewed and accepted, your application gets into the USC.

The Ubuntu App Review Board has got 130 apps to review, ask about some mistakes in the apps etc. etc. etc. That takes much time (just calculate it: 130 apps * 20 minutes per app = 44 hours.).


Ubuntu 14.04 very slow even with video card

Go to system-settings, click on "Software & Updates", and go to the "Aditional Drivers" tab.

From there, you can select the "tested" proprietary nvidia driver.

Furthermore, there's all kinds of stuff you can do to get support for your graphics card. Alot of times, when you run a program, you are not using "hardware acceleration" and so your graphics card is not used. This is such a broad area I would not be able to be more specific than to say these few suggestions:

Install synaptic and use synaptic to search for and install all the "opengl" packages for your card that are available (always pay attention to what may subsequently be uninstalled so you don't make a mistake when doing this).
Enable hardware acceleration in the settings for every application you use that may gain from using the graphics card like vlc for example.
If you are using chromium or google-chrome, go to the url "chrome:flags" and click on the first option to "Override software rendering list" and then restart chrome. To check your GPU status in chrome go to the url "chrome:gpu".

Finally, run these commands to allow hardware acceleration when using firefox adobe flashplayer:

sudo mkdir -p /etc/adobe
echo "EnableLinuxHWVideoDecode=1" | sudo tee /etc/adobe/mms.cfg
echo "OverrideGPUValidation=1" | sudo tee -a /etc/adobe/mms.cfg


sudo apt-get install indicator-power

and if it is already installed

gsettings set org.gnome.settings-daemon.plugins.power active true


Try this:

Open a terminal,Press Ctrl+Alt+T

Run it:

exec sudo -i
dd if=/home/user/Downloads/ubuntu-16.04.1-desktop-amd64.iso of=/dev/sdb
           <path to .iso>                                   <USB stick>


How to write a shscript to kill -9 a pid which is found via lsof -i

There is a -t (terse) option in lsof, which seems to do exactly what you are looking for i.e.

$ sudo lsof -ti tcp:80
1387
4538
4539

See man lsof

-t       specifies  that  lsof should produce terse output with process
         identifiers only and no header - e.g., so that the output  may
         be piped to kill(1).  -t selects the -w option.

Assuming you have the necessary permissions, you can pass the result to kill as a list of PIDs with command substitution:

kill -9 $(lsof -ti tcp:80)


Restoring broken Ubuntu 14.04 - startx wont start, ifconfig gives me no options to connect to the internet, wvdialconf doesnt work

If you really just want to re-install ati libs, you should be able to boot from a bootable CD/USB Drive and chroot into your old ubuntu install. Here are are some instructions. Then you should be able to install what you want with apt-get.


multiples entries for windows (UEFI) in the Grub list, which one is the good?

Looks to me like you'll want to use either the /EFI/Microsoft/Boot/bootx64.efi or /EFI/Microsoft/Boot/bootmgr.efi entries. Those are Windows specific (and actually most likely copies of the same file with different names).


Deluge error after restart Ubuntu(I need to delete 2 files)

You could make a script that deletes the two files and set it to run at start-up.

Something like this:

#!/bin/bash
rm /home/vas/.config/deluge/ipc/deluge-gtk
rm /home/vas/.config/deluge/ipc/deluge-gtk.lock

You'll need to place your scripts in /etc/init.d/.

See: https://superuser.com/questions/155476/how-do-i-make-a-script-run-upon-startup-of-the-ubuntu-machine

Also here is a short tutorial on how to bash script: https://help.ubuntu.com/community/Beginners/BashScripting


How do I make two ubuntu computers communicate with each other by controlling their wireless cards?

Set up one of the computers as an AP WiFi hotspot
Use NitroShare to actually send/receive data

sudo add-apt-repository ppa:george-edison55/nitroshare-dev
sudo apt-get update
sudo apt-get install nitroshare

As NitroShare is FLOSS, you can fork the C++ code if it would not meet your needs or even better: start contributing!  The NitroShare author is active on Ask Ubuntu, so drop by in the chat room if you're willing to do this.


Why does the sound icon turn blue sometimes?

The blue sound menu icon means that at least one application is trying to output sound but is unable to do so because the sound is muted.


Wacom tablet middle mouse button scrolling

I wanted to enable scroll/pan actions in my wacom, like we do in Windows by pressing the mouse middle button and move the mouse to up and down.
To do this:

First I listed the devices using xsetwacom --list devices:

$ xsetwacom --list devices
Wacom Intuos S Pen stylus           id: 14  type: STYLUS
Wacom Intuos S Pen eraser           id: 15  type: ERASER
Wacom Intuos S Pen cursor           id: 16  type: CURSOR
Wacom Intuos S Pad pad              id: 17  type: PAD

Since I wanted to enable scroll/pan using the lower button in wacon pen (Button 2), I used the command below (where "pan" is the value to enable the feature in Button 2)

xsetwacom --set "Wacom Intuos S Pen stylus" Button 2 "pan"

To test, go to your browser or any other document, drag the pen to up/down/left/ right while you click the pen Button 2.
To increase the sensitivity, I decreased the value of "PanScrollThreshold" parameter (the default value was 1300)

xsetwacom --set "Wacom Intuos S Pen stylus" "PanScrollThreshold" 200

References:

http://manpages.ubuntu.com/manpages/bionic/man1/xsetwacom.1.html
http://manpages.ubuntu.com/manpages/bionic/man4/wacom.4.html


Nautilus Elementary wont show "main toolbar"

The Elementary theme does not work correctly unless you have Nautilus Elementary installed.  Change your theme and your toolbar should come back.


I have a cluster of computers, how do I setup ntpd so they all have nearly the same clock?

Typically, you'd set an ntp server up on a single machine on your network, possibly your router or gateway.  That machine would call out to ntp servers over the Internet and make sure its time is accurate.  You will want to provide a few ntp servers in your region.  It will also provide time information to your LAN.  There are many tutorials on how to get this done properly for a LAN-only setup.

The other machines on your LAN would then make ntp requests to the ntp server on your LAN.  Your LAN ntp server will be the only machine they would query.

This would be the best method of making sure the machines on your LAN have near-matching times, as well as ensuring the LAN doesn't get get out of sync with the rest of the world.


I have found the answer the myself
It's problem with the transfer type in USB
you have to select one of the option out of four options where you can find MTP transfer etc


Move/Rename a lot of files with specific file size

File size is not a good way of determining duplicates. You can have two files with the exact same size but different contents. This means that it is quite likely that this approach will fail. That said, the following will do what you asked for.

Important: this assumes your file names have no spaces and no new lines.

find bad -iname "*.jpg" -printf "%s %f\n" | while read -r bs bf; do
  find good/ -iname "*.jpg" -printf "%s %f\n" | while read -r gs gf; do
    [ $bs -eq $gs ] && echo "mv good/$gf good/$bf";
  done
done

Explanation

find bad -iname "*.jpg" -printf "%s %f\n" : find all files whose name ends in .jpg or .JPG in the bad directory and print their size and file name.
while read -r bs bf; do : read each line of the output above, saving the file's size as $bs and its name as $bf.
The second find ... | while ...; done does exactly the same for the good directory, saving the file's size as $gs and its name as $gf.
[[ $bs -eq $gs ]] && echo "mv good/$gf good/$bf"; : If the bad file's size is the same as the good file's size, rename the good file using the bad file's name. If this does what you expect, remove the echo and change the line to simply mv good/"$gf" good/"$bf". Note that this will keep the last 'bad' file name as the final name for the 'good' file.

I want to stress that this is not safe, different files can have the exact same size and completely different contents. Instead of using this naive approach, you might be better off using a program that is specifically designed to compare images. I've never used any such software but a 3 minute search turned up DupeGuru. I suggest you try it first:

  DupeGuru : dupeGuru Picture Edition (PE for short) is a tool to find duplicate pictures on your computer. dupeGuru PE is a big brother of dupeGuru.

  This software works like dupeGuru, but is specialized for duplicate pictures matching. dupeGuru PE runs on Windows, Mac OS X and Linux.


How can I free up space from an older Ubuntu partition

Freeing up space from an older Ubuntu Partition

There are two ways to free space on a partition.  You can either delete unwanted files and directories individually or in groups, or you can reformat the partition in one swoop.

Uninstall OS Keep the space

You don't Uninstall an OS.  You can clean partition where the OS is installed by reformatting the partition.  The OS installs also have options to reformat the partition where you it's being installed.  So using that option will perform both the format as well as a clean install of the OS.

When you remove files from a partition or reformat the partition, you retain the space of the partition.  If you have a 10G partition and are using 5 Gigs of it, you'll have 5 Gigs left on that partiton.  If you delete 3 Gigs of files and folders, you'll then have 8 gigs of space on it.  Deleting all the files and folders on the partition will bring you back to 10 Gigs.  Formatting the partition will give you back the 10 Gigs in one swoop.

Ubuntu Install Process

When you are running the LiveUSB to install Ubuntu, you'll have the option to Erase and use the whole Drive, Install alongside the detected OS already install, or Something Else.  If you choose the Something Else option, it will prompt you for your choice for which partition(s) will be used.

Location of Steam Files

In response to your comments about using other drives for your Steam Games, the same is with Ubuntu as you indicated for the Mac and PC.  The feature is the same because it's a feature of Steam's settings.


Slow video reproduction quality in youtube with chromium and firefox in Ubuntu 13.10

Chrome has flash built-in.  You will have to uninstall flash since Chrome may have issues with trying to deal with two versions of Flash.

I currently use Chrome and find the built-in flash good.

Chromium, the open source version of Chrome, does not have built-in flash.  Therefore, you will have to download Chrome directly from Google.

The other option is to create a RAMDisk.  RAMDisk can speed up flash videos.  Furthermore, 64-bit Ubuntu seems to be faster than 32-bit Ubuntu.  Although, the computer must be able to support 64-bit.

Adobe stopped providing updates for Flash.  Therefore, Chrome is the only way to keep up-to-date with the latest flash versions in Linux.

As for me, I have used Firefox, Chromium, and Chrome.  Chrome works the best.  Unfortunately, I had to uninstall PulseAudio and install ALSA.  PulseAudio was causing some issues with some flash games.  The volume control kept going on then mute which caused some issues.

From what I understand, Flash works best with ALSA.  In any case, trial and error maybe the only way to find out what works best in your system.

Hope this helps.


Stick it in /etc/rc.local, before the exit statement.


Package needs to be reinstalled, but I can't find an archive for it

As you can see here, libstdc++-5-dev belongs to the Ubuntu Main Repository, so if it can't be installed it means you don't have access to such repository, which you should.

To enable Ubuntu Main Repository go to System Settings > Software and updates > Ubuntu Software and make sure at least the two first items (main and universe) are checked:

If somehow you just want to download that lib without enabling Main Repository (not recommended as you will face more problems in the future) you can get it here:

For Ubuntu 16.04 - 64bits
For Ubuntu 16.04 - 32bits


Yes it's available.
Pleas refer to How do I download and install Junos Pulse in Linux? How do I connect to the remote access - VPN in Linux?
to learn how to get it.

Steps are:

Verify your status, and install Java JRE.
Log on to the Web page with your credentials.
Download and save the ncLinuxApp.jar file to your computer.
When the download is complete, unpackage the ncLinuxApp.jar file.
Download and save the SSL certificate.
Export the new PATH
send only VT traffic through the VPN or all traffic through the VPN

Two possible alternatives are:

Cisco AnyConnect
Stonesoft MobileID


You're running in the exact same way as me: SSD for the system, HDD for /home.

Under Linux, there is a difference between the /boot and the /. The former is a tiny fraction of the system, whereas the latter is everything else (in your case: excluding /home).

So your SSD is not only used for the /boot but also for /tmp (where temporary files get created) /bin where executables reside, ...  Basically, if you install software and games they're going to go to the SSD, and the save files will be going to your HDD.

For the full documentation head to FileSystem Hierarchy Standard and download the PDF and read all about it.

So don't do anything! You've got the perfect system!


Is it possible to drag files with right click?

If you Middle-click drag and drop (or press Alt after you've started moving the icon so that it doesn't trigger the window move) and then let go of the file a context menu shows up giving you the choice of Copy, Move, link, etc.

Example dragging a file onto my desktop:

The cursor will have a little question mark by it, then when you let go this pops up:

Someone filed a bug report with Nautilus  to support right click drag and drop but the developer deemed that unnecessary.


How do I download mail folders from command line?

There are a lot of tools that can do this. Some can do both: imap and pop3. Some are limited to pop3 or imap.

As an example take a look at getmail: http://www.howtogeek.com/138713/how-to-backup-your-gmail-account-using-your-ubuntu-pc/ (in standard repo (xubuntu 13.1 is getmail4)

Another one is "offlineimap" that can copy mails from a imap server to a local dir: https://popey.com/blog/posts/2010/12/30/backup-email-with-offlineimap.html

Hope this helps!


How can I run a complete application from RAM?

You do not need to copy all dependencies in the RAM, since, Modern application doesn't load all of it's function at the same time. They load them from disk, when necessary.

Yes, The system may use HDD sometimes to make room for sufficient RAM, So, that it can load another application which may require more RAM. So, it uses a feature called "Swapping".

"Swapping" is good, since it enables you to load more applications at the same time. But it uses hard disk, which is a slow process.

So, if you believe that, you have sufficient RAM for not using swapping at all, you can disable swapping altogether.

To temporarily disable swapping: run this sudo swapoff -a in a terminal and hit enter.

If you want to disable swapping permenantly do this:

Open a terminal and run sudo gedit /etc/fstab
Carefully delete the line which contains word swap. save and exit gedit.
Restart and Login again.

Note: You should make a backup of /etc/fstab file, so that if somethings go wrong, you can restore that.

To backup: sudo cp /etc/fstab /etc/fstab.backup

To restore: sudo cp /etc/fstab.backup /etc/fstab

Hope this will help


I'd suggest you take a look at the man page of tail.  Just run man tail in your shell, or check it online.

  Print  the  last   10  lines of each FILE to standard output.  With
  more than one FILE, precede each with a header giving the file  name.
  With no FILE, or when FILE is -, read standard input.

  -f, --follow[={name|descriptor}]
  output appended data as the file grows; -f, --follow, and --fol-
  low=descriptor are equivalent

And if you don't know what's man, you can always type man man ;)


A new command combining apt update && apt upgrade in 18.04 or some later beta?

Set in terminal with command alias your new defined command for this like for example :

alias update='sudo apt-get update && sudo apt-get dist-upgrade'

Then you have your new command "update" and you can lean back, when typed "update" in terminal.


I can't find my Windows 7 after installing Ubuntu and creating new partition table

Your data is likely all gone. When you selected "Create new partition table" you told your installer to ignore whatever it saw on the hard drive and just pretend it was a blank slate.

You may want to look into tools like photorec to try to recover your data. If this is the path you're going to take, shut your computer down now and don't boot into your hard drive - only boot from the live USB you originally used.


Ubuntu 14.04.1 is consuming 7.8 gigs of 8 gigs ram?

Quoted from the great answer in SE here:

  First, repeat this mantra for a little while: "unused memory is wasted
  memory". The Linux kernel keeps around huge amounts of file metadata
  and files that were requested, until something that looks more
  important pushes that data out. It's why you can run:

find /home -type f -name '*.mp3'
find /home -type f -name '*.aac'

  and have the second find instance run at ridiculous speed.

  Linux only leaves a little bit of memory 'free' to handle spikes in
  memory usage without too much effort.

Now you have many tools to list the process such the GUI app system monitor or CLI tools such as top , htop etc....

You could just fire up top and press M to sort processes by memory usage.


Boot the computer and open one of the tty consoles with ctrl + alt + f1. This allows you to directly access the computer's terminal. Type your username and password to login, then run the command sudo apt-get install compiz, and enter your password when prompted. Then reboot the computer when done with sudo reboot. Your GUI should then be functional again.


How to delete all the files with a certain extension from a folder and all of its subfolders?

A quick and clean solution for the command line would be

cd <dir>
find . -type f -iname \*.jpg -delete

. tells to start searching in the current folder.
-type f tells find only to look for files.
-iname makes the search case insensitive.
-delete tells find to delete/remove all files found.

CAUTION! I recommend running the command without -delete first to get a list of the files that will be removed when -delete is included in the command. This way a small typo won't delete anything you didn't intend to.

For more information on how to use find and what it can do see man find

Note that find will not produce any output when -delete is used.

Regarding the comment on multiple extensions

find . -type f \( -name \*jpg -o -name \*png \) -delete

( .. ) Group expression. Needs to be escaped from the shell, hence \( .. \) in the example
-o logical or

So the above example will match any file which has either jpg or png at the end of it's name. More extensions can be added in the same way. Just make sure to remember -o between every -name statement, if -o is not specified find will default to -a (and) which won't work since a file can't end in both jpg and png at the same time.


Unable to login after deleting Guest User Account

Okay sounds like maybe you have some error with your /etc/lightdm/lightdm.conf

Boot your computer and when it stops and hit Ctrl+Alt+f2

You should get a login prompt. Login with your regular username and password.

Now to fix the config

sudo vim /etc/lightdm/lightdm.conf

or

sudo nano /etc/lightdm/lightdm.conf # if your not comftable with vim, nano is easier.

Edit your config so it looks like this:

[SeatDefaults]
autologin-user=
greeter-show-remote-login=false
allow-guest=false

Your not going to have the luxury of copy and paste so be careful to enter it correctly make sure there is nothing else in the file but this. Save the file and then type

sudo reboot

It should then boot normally.


Text not visible when renaming files and folders in Ubuntu Gnome 16.04

It seems that you are using the default theme (Adwaita) for Ubuntu Gnome 16.04.

This issue is frustrating, however, there is a workaround. Please note that it is not possible to make it identical to the View items as a list option view.

Firstly, open up the terminal and enter this command:

cp -a /usr/share/themes/Adwaita/ ~/.themes/custom

After that open up your browser and visit this link: GTK Github.

Then click on the Clone or download button, then click Download Zip. After the zip is downloaded, extract it and then you will get a directory named gtk-master.

After that open up terminal and run this command:

cp -a ~/Downloads/gtk-master/gtk/theme/Adwaita/* ~/.themes/Custom/gtk-3.0/

Then enter this command:

sudo -H gedit ~/.themes/custom/gtk-3.0/nautilus-entry-section.css

This will open gedit with a newly created file named nautilus-entry-section.css. Inside that file add the following code:

NautilusCanvasViewContainer.view EelEditableLabel.entry{
color: black;
background: #3F90ED
}

NautilusCanvasViewContainer.view EelEditableLabel.entry:selected {
color: white;
}

.nautilus-desktop.nautilus-canvas-item {
color: white;
}

Save and exit the file.

It is to be noted that you can change the color styling according to your preferences. The background: #3F90ED; line makes the background of the typing area to blue while color: white; and color: black;makes the font color of the text to white and black respectively. You can change them according to your liking. For example, you can make the background to white and text color to black when it is not selected and blue when it is selected. To do so, just change the content of nautilus-entry-section.css file accordingly.

After you have saved and exited the nautilus-entry-section.css file, next you are going to edit the gtk.css file. For that enter the following command:

gedit ~/.themes/custom/gtk-3.0/gtk.css

This opens up gedit with the gtk.css file open. Enter the following line to the end of the file:

@import url("nautilus-entry-section.css");

Save and exit.

To apply the modified theme, open up the Tweak Tool, then click on Extensions tab, scroll down and enable the extension User themes. Exit the Tweak Tool. Again open up Tweak Tool, then in the Appearance tab under the Theme section, make GTK+ use the Custom theme.

Now the problem is solved, and the text is readable. Again, if you don't like the color, change it according to your liking, however you will not be able to make it identical like the "View items as a list" option view. I have tried my best. Note that this is a workaround not a fix.


Ralink RT3290 wifi drops every 5 minutes

Write this:
sudo iwconfig

Now, find your adapter name-
http://i.imgur.com/9H5zbWj.png

sudo iwconfig wlan0 power off

Replace 'wlan0' with yours.