How to copy everything from one directory to another using 'cp' command?

no
do not specify the files:

cp -Ri /path/one/ /path/two/


Please be aware the a cronjab executes in a shell that has a limited  environment setup. By that I mean that when you open a terminal and enter env you will see a lot of environment variables; one of the most important ones is PATH. The cron job does not login so to speak, thus .profile files are not executed. So in your script you must make sure to set or complement environment variables like PATH.
Also, a cron entry should not use the ~ but put the full path.

In my system I created a small script to list the environment variables that are set when the script is started in cron. As you see a lot less than when in a terminal:

HOME=/home/willem
LANG=en_US.UTF-8
LC_ADDRESS=nl_NL.UTF-8
LC_IDENTIFICATION=nl_NL.UTF-8
LC_MEASUREMENT=nl_NL.UTF-8
LC_MONETARY=nl_NL.UTF-8
LC_NAME=nl_NL.UTF-8
LC_NUMERIC=nl_NL.UTF-8
LC_PAPER=nl_NL.UTF-8
LC_TELEPHONE=nl_NL.UTF-8
LC_TIME=nl_NL.UTF-8
LOGNAME=willem
PATH=/usr/bin:/bin
PWD=/home/willem
SHELL=/bin/sh
SHLVL=1
_=/usr/bin/env

Proper scripts start with a shebang expression, some text explaining what the script will do (you might forget after a few months) and then setting environment variables. A small example (NB willem is my user name:

#!/bin/bash    # Script is created and tested for Bash.
# Example script Hello, runs outside a terminal so PATH is minimal.
# We must set env vars.
# Note I do not use "export PATH=$PATH:..." etc, because I want my progs
# directory to be found first.
export MYHOME=/home/willem
export MYLOGS=$MYHOME/logs
export MYPROGS=$MYHOME/prog
export PATH=$MYPROGS:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
#
# The main code of the script:
#
echo "Hello: started" > $MYLOGS/Hello.log
goodDay >> $MYLOGS/Hello.log   # goodDay is also in $MYPROGS
...
...
#EOF

To put the script in cron, enter crontab -e:
You are in vi so go to end of file and add:
    * * * * * /home/willem/prog/Hello

Close and save, and view your crontab entry/entries: crontab -l


I have fixed this by adding the following line to the file /etc/default/halt:

INIT_HALT = POWEROFF


How to find the pid of the process which has deleted a file?

Finally I found the answer here.

The Linux Audit daemon will do the trick.

sudo auditctl -w /path/to/somefile -p wra

and then

ausearch -f /path/to/somefile -i


Cannot install wireless network USB adapter on Ubuntu

You could install the latest drivers from this GitHub repo: https://github.com/aircrack-ng/rtl8812au.git

Though the repo name have RTL8812AU in it, the repo description does say, RTL8812AU/21AU and RTL8814AU drivers.

As per the repo, this is how you can install the drivers using DKMS method:

sudo apt update
sudo apt install dkms
git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl8812au.git
cd rtl8812au
sudo ./dkms-install.sh

Your USB WiFi adapter should be working now.


X Error of failed request: BadValue (integer parameter out of range for operation)

That particular error means you can't create an OpenGL context across the network.  OpenGL is the library used to connect to the local graphics processing unit  (GPU) for 3-D graphics hardware acceleration.  There is not networked support for OpenGL, so trying to create a context over the network fails.


A new version is released to apply fixes to the bugs found in previous version. Although it is also true that new version could contain more bugs than previous one.
Therefore I recommend trying to fix your 20.04.1 issue rather than rolling back. However it's totally up to you. Here is the download link for your Ubuntu 20.04 : http://old-releases.ubuntu.com/releases/20.04/


Looks like the same file exists in two distinct packages: gir1.2-mutter-3.0 and gir1.2-mutter-2.91 (note these are package names without version numbers). You could:

Remove one of the packages, probably gir1.2-mutter-3.0. The downside is that this could force you to remove other packages that depend on it.
Install gir1.2-mutter-2.91 using dpkg --force-overwrite, which will overwrite the conflicting file. There is a small risk that this could cause problems, but you can always recover by reinstalling the old version.


Apparmor denies several processes since a kernel change

Yes, major changes to kernel security (i.e. apparmor) missed kernel 4.14-rc1 due to some issues but were included in kernel 4.14-rc2. And yes, there is a non-backwards compatible change.

Myself, I either compile the kernel with apparmor disabled, or more simply just boot with it disabled. i.e. in `/etc/default/grub":

#GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 consoleblank=300"
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 consoleblank=300 apparmor=0"

The related launchpad bug report (even though the description is a little wrong) is here. It does have some work arounds.

Note that this question and answer might end up being put on hold, because the release candidate kernels are actually not supported here.

EDIT: late breaking entry from the bug report:

  The kernel patch causing the issue has been reverted. So 4.14-rc7
  should work as pre 4.14-rc2


How can i format output from an aliased command (`weather EPWR`)?

You can pipe the output of do-i-need-a-jacket to this Perl command:

perl -ne 'if(/^(   Temperature: )(.*)/){print("$1\e[31m$2\e[0m\n")}elsif(/^(   Relative Humidity: )(.*)/){print("$1\e[34m$2\e[0m\n")}else{print}'

Expanded into a script:

#!/usr/bin/perl

use strict;
use warnings;

-t STDIN && exit;

while(<STDIN>) {
    if(/^(   Temperature: )(.*)/) {
        print("$1\e[31m$2\e[0m\n")
    }
    elsif(/^(   Relative Humidity: )(.*)/) {
        print("$1\e[34m$2\e[0m\n")
    }
    else {
        print
    }
}

You can colorize other lines with other colors by adding other elsif blocks after the if block and before the else block (you'll have to change the string to match and the ANSI color escape sequence to match the desired color):

elsif(/^(   Temperature: )(.*)/) { # Change this to the string to match ("Wind", "Weather", "Sky conditions", ...)
    print("$1\e[31m$2\e[0m\n") # Change this to the ANSI color escape sequence to match the desired color
}

List of possible ANSI color escape sequences:


Why did adding read permissions recursively to /etc break ssh?

You changed permissions recursively for everything under /etc.  The majority of your software keeps essential files under this directory.
In many cases, changing the permissions of files needed by your software can cause the software not to work as intended.
You probably broke a lot more than ssh.  You will probably need to reinstall the operating system since there is not a simple way to undo the damage this command would cause: permissions are not the same for every file under this directory.


Cannot add APT repository: SSL handshake failed

Looks like you are using a release which is no longer supported (The gnutls version is specific for Ubuntu 14.04). And you are trying to use a server for the packages which requires SNI which can be seen from the SSLLabs report. Only, it is a known problem at least with the release you are using that APT server which require SNI do not properly work - see https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1551464. Given that your release is no longer supported this is unlikely to get fixed.

  ... would it be a good idea to clone the sury.org repository on a local website on my machine, with no SSL ...

That would be ok. The main security is provided by the signature of the package and not by HTTPS. And you've already installed the key to check the signature as trusted.


There is - through dosemu. You can get it through software center or apt. Place the executable into .dosemu/drive_c directory in you home , and fire up dosemu. You can find the executable with dir command,  and run with ./


Hostname conflict between system hostname and apache2 vHost

From the comments, there is confusion here between the local hostname as set by hostnamectl , apache server names, and DNS (Domain Name Service).

HOSTMAME

This is a setting only used on your localhost.

To set the hostname of your local computer, use  hostnamectl

sudo hostnamectl set-hostname new_hostname

IMO this is preferable to manually editing /etc/hostname and /etc/hosts as it is a single command, less prone to typos, and less likely to break sudo.

DNS

Domain Name Servers (DNS) is separate and define how computers connect to other computers the "phone book" analogy is used to describe how DNS works, but it is a network so that you can use a name rather then an ip address to connect over a network protocol to a server, ie http://google.com rather then an ip address.

For detailed information on DNS see https://webhostinggeeks.com/guides/dns/ or similar.

This is somewhat related to FQDN - https://serverfault.com/questions/269838/what-is-the-difference-between-a-hostname-and-a-fully-qualified-domain-name

In this discussion I will use FQDN to refer to the network name you use to connect to a server over a network protocol such as http or ssh. DNS servers use FQDN only such as foo.com and not foo, /etc/host can use non FQDN such as foo rather then foo.com or even both.

So at some point, as a part of your web server installation / configuration, you registered one or more FQDN with a DNS provider such as godaddy or similar. These services run and maintain DNS servers and, in your case, map your apache name servers to your public ip address.

NETWORK APPS USE /etc/hosts and DNS servers to resolve FQDN

Network applications will typically look first in /etc/hosts to resolve FQDN to an ip address. If there is no entry in /etc/hosts they will use DNS to resolve the IP address.

No network applications use the information a system administrator writes in /etc/hostname to resolve DNS.

NMAP

So when you run nmap, it uses reverse DNS service and /etc/hosts to resolve FQDN.

See the nmap documentation for details - https://nmap.org/book/man-host-discovery.html

See also this discussion on server fault - https://serverfault.com/questions/153776/nmap-find-all-alive-hostnames-and-ips-in-lan

There is probably some option or configuration to force nmap to use /etc/hosts or disable DNS lookup, and perhaps someone will post that information here, but it is beyond this discussion.

The short answer is nmap, ssh, http, and other network protocols use DNS and/or reverse DNS lookup to resolve your FQDN to an ipaddress as defined by DNS servers or /etc/hosts and not /etc/hostname on either your local machine or the remote server.

SSH

SSH will use both /etc/hosts and DNS servers.

See the ssh documentation or https://linux-tips.com/t/disabling-reverse-dns-lookups-in-ssh/222 for how to disable ssh from useing DNS services.

If ssh is not returning the hostname you expect you need to investigate further, see https://serverfault.com/questions/266897/why-is-hostname-lookup-in-ssh-returning-a-different-result for details on how to do this.

So in your case I assume ssh is also using DNS services rather then relying only on /etc/hosts to resolve FQDN you are using on the command line.

My practice
I personally do not use my apache FQDN for my local hostname nor do I use my FQDN to ssh into my server nor do I typically pass FQDN to nmap nor do I use NMAP to determine the local hostname of a server.

nmap will tell you the FQDN registered to a FQDN if it exists it does not tell you what is in /etc/hostname of the remote server.

See Apache error "Could not reliably determine the server's fully qualified domain name"

Example:

NMAP by ip address

This works assuming the ip address is public and the remote host is up and not firewalled to block nmap ;)

bodhi@daemon:~$nmap --top-ports 10 8.8.8.8

Starting Nmap 7.40 ( https://nmap.org ) at 2017-06-28 16:10 MDT
Nmap scan report for google-public-dns-a.google.com (8.8.8.8)
Host is up (0.081s latency).
PORT     STATE    SERVICE
21/tcp   filtered ftp
22/tcp   filtered ssh
23/tcp   filtered telnet
25/tcp   filtered smtp
80/tcp   filtered http
110/tcp  filtered pop3
139/tcp  filtered netbios-ssn
443/tcp  open     https
445/tcp  filtered microsoft-ds
3389/tcp filtered ms-wbt-server

Nmap done: 1 IP address (1 host up) scanned in 2.15 seconds

NMAP by FQDN

This also works as long as the name you give is a registered FQDN

bodhi@daemon:~$nmap --top-ports 10 google.com

Starting Nmap 7.40 ( https://nmap.org ) at 2017-06-28 16:10 MDT
Nmap scan report for google.com (172.217.11.238)
Host is up (0.10s latency).
Other addresses for google.com (not scanned): 2607:f8b0:400f:800::200e
rDNS record for 172.217.11.238: den02s01-in-f14.1e100.net
PORT     STATE    SERVICE
21/tcp   filtered ftp
22/tcp   filtered ssh
23/tcp   filtered telnet
25/tcp   filtered smtp
80/tcp   open     http
110/tcp  filtered pop3
139/tcp  filtered netbios-ssn
443/tcp  open     https
445/tcp  filtered microsoft-ds
3389/tcp filtered ms-wbt-server

Nmap done: 1 IP address (1 host up) scanned in 2.36 seconds

NMAP with a bogus / non exisstant FQDN

bodhi@daemon:~$nmap foo.bar
Starting Nmap 7.40 ( https://nmap.org ) at 2017-06-28 16:10 MDT
**Failed to resolve "foo.bar".**
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.55 seconds

If you are having difficulty we need specific information.

Post the contents of /etc/hostname and /etc/hosts
Tell us the FQDN of all your registered domain names
post the relevant sections of your apache configuration files
Post the exact nmap and ssh commands you are running and their output.

Without further information we can not clarify any confusion between your local hostname and a network FQDN or debug your connections if the FQDN are not resolving to the remote server you expect.


Entire system freezing after pressing "Suspend"

OK after a bit of work I modified the scrips above from the other suggestions. Thank you @wangdw! Here is the following bad ass script (don't forget as before to create a file using sudo gedit /etc/pm/sleep.d/20_custom-ehci_hcd and also to set the read permissions using sudo chmod 755 /etc/pm/sleep.d/20_custom-ehci_hcd):

  #!/bin/sh
  #inspired by http://art.ubuntuforums.org/showpost.php?p=9744970&postcount=19
  #...and http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug
  # tidied by tqzzaa :)

  VERSION=1.1
  DEV_LIST=/tmp/usb-dev-list
  DRIVERS_DIR=/sys/bus/pci/drivers
  DRIVERS="ehci xhci" # ehci_hcd, xhci_hcd
  HEX="[[:xdigit:]]"
  MAX_BIND_ATTEMPTS=2
  BIND_WAIT=0.1

  unbindDev() {
    echo -n > $DEV_LIST 2>/dev/null

  for driver in $DRIVERS; do
    DDIR=$DRIVERS_DIR/${driver}_hcd
    for dev in `ls $DDIR 2>/dev/null | egrep "^$HEX+:$HEX+:$HEX"`; do
      echo -n "$dev" > $DDIR/unbind
      echo "$driver $dev" >> $DEV_LIST
    done

  #for bus in $EHCI_BUSES; do
     echo -n $bus > /sys/bus/pci/drivers/ehci_hcd/unbind
 # done

  done

}

bindDev() {
  if [ -s $DEV_LIST ]; then
    while read driver dev; do
      DDIR=$DRIVERS_DIR/${driver}_hcd
      #for bus in $EHCI_BUSES; do
          echo -n $bus > /sys/bus/pci/drivers/ehci_hcd/bind
      #done
      while [ $((MAX_BIND_ATTEMPTS)) -gt 0 ]; do
          echo -n "$dev" > $DDIR/bind
          if [ ! -L "$DDIR/$dev" ]; then
            sleep $BIND_WAIT
          else
            break
          fi
          MAX_BIND_ATTEMPTS=$((MAX_BIND_ATTEMPTS-1))
      done

    done /dev/null

  chvt 1
  chvt 7
}

  EHCI_BUSES="0000:00:1a.0 0000:00:1d.0"
  case "$1" in
    hibernate|suspend)
    unbindDev;;

    resume|thaw)
    bindDev;;

    esac


How do I disable mouse acceleration for my mouse but keep in enabled for my touchpad?

There are several utilities for playing with mouse acceleration (for example, xset m changes all connected devices and xinput --set-ptr-feedback <device> changes a specific device; see the xset and xinput man pages for further details), but these settings will be lost on reboot.

A more permanent solution would be to create a new file in /usr/share/X11/xorg.conf.d/ called something like 60-mouse-no-accel.conf with the following content

# Remove acceleration from actual mice (but not touchpads, etc)

Section "InputClass"
    Identifier "Disable mouse acceleration"
    MatchIsPointer "on"
    MatchDevicePath "/dev/input/event*"

    # Set mouse acceleration.  Defaults to 2/1 4
    # Query using xset q | grep -A 1 Pointer
    # Set using xset m 2/1 4
    #  or using xinput --set-ptr-feedback <device> 4 2 1
    # Set acceleration to zero to disable
    Option "AccelerationNumerator" "0"
    Option "AccelerationDenominator" "1"
    Option "AccelerationThreshold" "4"
EndSection


Wireless seems to disconnect and reconnect

Wireless is influenced by many weird things, like the weather, your neighbor using his network, making a phonecall or using the microwave. You should exclude these factors and try different times without downloading on short distance. Maybe even change wireless channels.

Which drivers do you use for your wireless card on ubuntu? And on arch?
Are you using a desktop pc or a laptop? In the latter make sure you test from exactly the same location.


Ubuntu 16.04 fan problem on my Asus UX501VW

Just for the record, since I have no interest in using the intel gpu, I never have. As an experiment, I used the nvidia gui to change to intel, logged out, and, after login the same fan issue occurred in 15.10,

uname -a
Linux deblap2 4.2.0-36-generic #41-Ubuntu SMP Mon Apr 18 15:49:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

thus, as far as I can tell, it is not ubuntu 16.04 specific, and, in the various distros I attempted to install on the laptop, including debian, manjaro, mandriva, it has universally occurred, except that only ubuntu 15.10 installed correctly.

Also more interesting, I could not then revert by using the nvidia gui, as after logout touchpad froze, and I need to hard shutdown.

this is interesting as the problem with the power switch was the main reason i ended up with ubuntu,  as ever other distro I tried had the issue that the power switch and the commands reboot and shutdown did not work as expected.

I thought it was a kernel version issue, or my laptop, same as OP's, or elan or evdev, or coretemp,  but even though arch recommended adding lmsensors and coretemp, coretemp is loaded. thus, the post and answers bring us one step closer, as the issues are somehow gpu related.

best

M


Install Kubuntu(16.04) and GRUB to an external drive to create a portable OS

Try this:
stap 1: download a live cd
step 2: boot your pc from the live cd (with external HDD attached to the pc)
follow the installation like normal and when you get to select hard drive, just select your external one!

Grub however i do not know


Why does Empathy ask for permission to access my remote accounts?

There isn't anything collecting information about you, empathy uses online accounts integration to provide the credentials necessary to login to those services.  It isn't really different than with the earlier versions of empathy where you gave empathy your login information directly.  Now when you setup the account, you can also choose to let other applications use the same credentials.  For example, if you add your google account, you can allow empathy and evolution to use it for IM and email.

The account information you add stays on your local system, and not shared elsewhere.


How to remove Windows from grub menu and boot straight to ubuntu?

In the Ubuntu system, run this command in the Terminal:

sudo update-grub

That will rebuild the list of available operating systems, and Windows will no longer appear on the list.

There still may be a list, since you can choose between different kernel versions, or to test your system's RAM.

So if you find you still don't like the menu, you can make it appear for a shorter time.

Decrease GRUB timeout

You can even make it appear for no time at all, by setting the timeout to 0. Then, if you find you do need to access it, hold down Shift while booting, and it will appear.


Your device is relatively new and the driver has, up to now, been tricky to impossible to get working properly. However, a new and improved driver has appeared! I have compiled it successfully but I don't have the device, so I can test no further.

Please get a temporary internet connection by ethernet or tethering or whatever means possible. Open a terminal and do:

sudo apt-get install linux-headers-generic build-essential git
git clone https://github.com/neurobin/MT7630E.git
cd MT7630E
make
sudo make install
sudo modprobe mt76xx

It may take a reboot. Please let us know your result. We will probably have one additional step.


Try with installing following packages :

sudo apt-get install hp-ppd hpijs hpijs-ppds hplip hplip-cups hplip-data hplip-dbg hplip-doc hplip-gui printer-driver-postscript-hp djtools

You can find some Ubuntu printer drivers Here.


On Linux, a container is not a virtual machine. It is a regular OS process in an environment bubble, so no virtualization is implied.

Windows has to jump through hoops to run Docker containers (that are mostly Linux things) and one of the hoops is a small virtual machine.


Open 8 panes of TMUX and go to different directory in each one , and run a command in each pane?

Try the following code in a script - works for me on Tmux 3.1:
#!/bin/bash

# Create a new session named "newsess", split panes and change directory in each
tmux new-session -d -s newsess
tmux send-keys -t newsess "cd /path/to/directory1" Enter
tmux split-window -h -t newsess
tmux send-keys -t newsess "cd /path/to/directory2" Enter
tmux split-window -v -p 66 -t newsess
tmux send-keys -t newsess "cd /path/to/directory3" Enter
tmux split-window -v -t newsess
tmux send-keys -t newsess "cd /path/to/directory4" Enter
tmux split-window -v -t newsess
tmux send-keys -t newsess "cd /path/to/directory5" Enter
tmux select-pane -t newsess:0.0
tmux split-window -v -p 66 -t newsess
tmux send-keys -t newsess "cd /path/to/directory6" Enter
tmux split-window -v -p 66 -t newsess
tmux send-keys -t newsess "cd /path/to/directory7" Enter
tmux split-window -v -t newsess
tmux send-keys -t newsess "cd /path/to/directory8" Enter
# Set pane synchronization
tmux set-window-option -t newsess:0 synchronize-panes on
# Run command in all 8 panes
tmux send-keys -t newsess "npm run dev" Enter
# Attach to session named "newsess"
tmux attach -t newsess

For testing I'd recommend running pwd instead of whatever command you wish to run in 8 panes simultaneously (also to check directories are correct). ;-)
If you want to run different commands in each pane, you of course just run the command with send-keys after changing directory. But I was under the impression that you want to run the same command in each pane, and that's why pane synchronization would work.


unable to ssh from one server to another

When you want to send data between two machines on a network, those machines need to know how to reach each other. You can imagine that (on a very high level) like driving instructions: "If you want to get from A to B, go five miles ahead, then turn left, then ...". On a more technical level, those instructions look more like "You are A. If you want to send data to B, hand the data over to X. If you want to send data to C, hand the data over to Y. If you want to send data to D, ...".

That principle is called "routing", and the ways for a system to get data to some destination are called "routes". And that's exactly what your servers are complaining in the error message: "No route to host". That basically means "I'm A and you want me to send data to B, but I have no clue how to find B on the network."

So the problem is with your basic network setup. We don't know how your network is set up, and giving you a basic course in networking is well beyond the scope of this site. But I hope I could give you a pointer what to read up on :)


How do I direct a file to be stored in a different folder?

You specify a path:

ls > ~/Desktop/textfile

~ is your home directory
/ separates components in the path
so to point to something inside your home directory, say baz instead in bar inside foo, you do ~/foo/bar/baz.

Also see:

When to use a preceding slash in path names? (e.g. for the 'cd' command)


Script to un-hide files with specific extention in folders reccursively

There is a good answer on sister-site stackoverflow: It says:

#!/bin/bash
recurse() {
 for i in "$1"/*;do
    if [ -d "$i" ];then
        echo "dir: $i"
        recurse "$i"
    elif [ -f "$i" ]; then
        echo "file: $i"
    fi
 done
}

recurse /path

  OR if you have bash 4.0

#!/bin/bash
shopt -s globstar
for file in /path/**
do
    echo $file
done

Say thank you over at stackexchange to ghostdog74 if this works for you. The askubuntu account will work there too.


I haven't tried this myself, but it may work. I don't really know what you mean by "I have no Ubuntu left" and how much of Ubuntu you are missing.

Take a look at https://help.ubuntu.com/community/Tasksel

The first thing i would try is to run...

sudo apt-get install ubuntu-desktop^

It may help. If not, let us know.


You can use a for-loop that goes through each item and checks the character count with wc -m command.

Here's your script, edited. I apologize if I use somewhat different syntax for looping , but that's just what I'm used to.

serg@ubuntu[/home/xieerqi]
$ cat stations.sh
#!/bin/bash
echo -n "Which station or stations you want to download?"
read station

for item in $station; do
   NUM=$(printf $item | wc -m)
     if [ $NUM -gt 4 ]; then
    echo "Error: number of chars in $item greater than 4"
    exit 1
     fi
done

ELEMENTS=${#station[@]}
for (( i=0;i<$ELEMENTS;i++)); do
    echo you chose ${station[${i}]} stations to download data
done

serg@ubuntu[/home/xieerqi]
$ ./stations.sh

E.g. If your station's names are asdf, yolo and swag, you chose the asdf yolo swag parameter to download data:

serg@ubuntu[/home/xieerqi]
$ ./stations.sh
Which station or stations you want to download? asdf qwerty swag
Error: number of chars in qwerty greater than 4

Notice that I use printf, not echo. echo outputs additional trailing line, so that messes up the character count. If you'd prefer using echo, then use echo -n to avoid printing that newline


BIOS
MSI B75A-G41 (MS-7758)
It appears that you have a very old BIOS version 3.0. Confirm with sudo dmidecode -s bios-version. There's a newer BIOS, version 17.8, available here.
How to flash BIOS .pdf document is here.
How to use M-FLASH to update BIOS video is here.
Note: Confirm that I have the correct web page for your motherboard.
Note: Have good backups before updating the BIOS.
disks
re: "1TB WDC WD10EZEX-08WN4A0 (WD Blue). Only one data partition which is formatted as exFAT."
If you're planning on sharing files with Windows, NTFS would be a better choice.
re: "PNY CS900 480GB SSD"
Confirm that you have current firmware installed in this SSD.
video
Your Intel(R) HD Graphics may require Kubuntu 20.10 to operate properly.
Update #1:
Regarding the video, as long as you're on 20.10 (not 20.04) you might try a newer kernel. Go to https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10 and try that kernel.
Update #2:
All flavors of Ubuntu and Kubuntu fail, as does Linux Mint. Suspect defective CPU or motherboard. You could try adding a discrete video card and see if that makes any difference.


Unable to boot after depleting the battery

If you can't even see the Dell logo or access the bios, then the hardware is busted.  You'll have to take it back to Dell.


I'd try to check out the desktop keyboard layout switcher applet and if it's possible to create a new layout from an existing one, then modify that new layout.
Switching to such a layout should be a matter of only one or two mouse clicks.


How do I retrieve data from a harddisk running Ubuntu?

This worked for me:-
1.Take out the internal harddrive and use sata cable or case to connect it to other pc
2. Other pc should be running ubuntu or you can use vm to run ubuntu on it
3. Connect your internal harddrive and copy the data to the desired storage system


Wine won't let you reach the ring0 of your processor. The place where privilege instructions can be executed.

Linux provides a kernel module msr.ko which allows to read/write model specific registers described in the Intel Architectures Software Developer Manuals. Same with AMD into its BIOS and Kernel Developer's Guide

https://software.intel.com/en-us/articles/intel-sdm

http://developer.amd.com/resources/developer-guides-manuals/

For the 6600K, you may luckily find voltage information into its datasheets. PCI will be queried to get values.

You will program algorithms with the help of the MSR registers and the leaves of the CPUID instruction to get the processor Turbo ratios, and estimate the BCLK with two TSC reads, sampled on an interval.

Turbo frequency is the product of the Ratio and the Base Clock

I've programmed CoreFreq which beside vcore will display frequencies and the idle states.
Feel free to dig the algorithms in the source code:

https://github.com/cyring/CoreFreq


Why does apache keep running out of memory?

This is not to do with Apache, but is to do with the sites you are running from it.

Either you have a memory leak in the software you are running, or you are a victim of your own success and are attracting too many concurrent visitors for the server resources you have.

So the possible avenues of attack are :

Test for memory leaks

Repeated requests should not lead to slowly increasing memory consumption

Limit the number of concurrent sessions by reconfiguring your app / web server
Increase the amount of RAM in your server


What will be installed Windows or Ubuntu on Factory data reset on pre-windows machine?

If I understand you correctly you wonder what will happen if you make the Dell factory reset from the Dells boot options menu:
If you installed Ubuntu alongside Windows  - therefore leaving the preexisting partitions untouched then the Dell factory reset will most likely bring Windows 10 back. If the recovery partition (do you have a hidden partition?) doesn't exist anymore then probably no reset will take place. The factory reset of your Dell will in no case bring Ubuntu back if the preinstalled OS was Windows.


Unable to run Ubuntu in VM due to AMD-V not available

Hyper V needs to be turned off in my case. My virtualization was enabled in BIOS.
I had to go in disable the virtualization save it. Then during reboot go back into BIOS again to enable virtualization again. Now after Reboot in Windows, VM is working with no issues.

Don't think it matters but for reference, using a MSI Tomahawk B450 MAx motherboard. Weird for the need to switch the virtualization off and on again. But it worked for me. Hope it helps someone in similar situation.


Open /etc/environment and manually set the JAVA_HOME Directory.

sudo nano /etc/environment

In your case to set Java 7 add the following line in /etc/environment

JAVA_HOME="/usr/lib/jvm/java-7-oracle/jre"

Then update the source by executing the following command:

source /etc/environment


How to use gcc 4.9 when it's installed in same directory as newer gcc

I assume nvcc is the nVidia CUDA compiler, which is what this answer is based on, but since you don't provide that information, that's a guess...

The following is a snippet from the CUDA toolkit docs (at http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/):

  On all platforms, the default host compiler executable (gcc and g++ on Linux, clang and clang++ on Mac OS X, and cl.exe on Windows) found in the current execution search path will be used, unless specified otherwise with appropriate options (see File and Path Specifications). - See more at: http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/#sthash.Tphx1Ttz.dpuf

Based on this, you may be able to technically 'force' a gcc and g++ version to be made available temporarily by the methodology in my now-deleted answer...

There's a reason that update-alternatives exists - it's designed to 'symlink' gcc and similar to the actual executable names.  In reality, /usr/bin/gcc-4.9 is actually the gcc 4.9 compiler executable, and gcc just symlinks to /etc/alternatives/gcc which in turn is a symlink to the real gcc executable

In my 14.04 environment this is shown here:

% file /usr/bin/gcc
/usr/bin/gcc: symbolic link to `/etc/alternatives/gcc'
% file /etc/alternatives/gcc
/etc/alternatives/gcc: symbolic link to `/usr/bin/gcc-4.8'

I actually have many versions of GCC on here, from 4.6 to 4.9, but this applies to other versions too.

To change the alternative one temporarily, you can do it with this command: sudo update-alternatives --config gcc

This is what it shows on my system, with a blinky cursor at the end:

% sudo update-alternatives --config gcc
There are 4 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection    Path              Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gcc-4.8   60        auto mode
  1            /usr/bin/gcc-4.6   30        manual mode
  2            /usr/bin/gcc-4.7   50        manual mode
  3            /usr/bin/gcc-4.8   60        manual mode
  4            /usr/bin/gcc-4.9   40        manual mode

Press enter to keep the current choice[*], or type selection number:

I manually redid the priorities, but you can see that I can manually select which compiler I want to use in the interim.  Therefore, you can temporarily change this, and then switch it to the gcc you want, and then switch it back when finished.

This should, then, permit you to temporarily use one compiler by gcc or g++ invocation, rather than having to specify a compiler directory.

Note that this will likely need to also be done for g++ as well - especially given the snippet from the docs above.  So, use g++ instead of gcc for changing g++'s 'version to use'.

The problem is, I don't see any easier way than this, in this case.  So every time you go in and change the compiler in this manner, to get it back to the default you need to run the update-alternatives commands again to re-set it back to what it was.

Alternatively, you could try and use the solution posed by steeldriver, which points to another potential solution (over on the Unix & Linux site):

  The method I've seen elsewhere is to symlink the desired gcc-x.y version to /usr/local/cuda/bin/gcc (and likewise for g++-x.y) - is this no longer valid?

Not sure if this approach will work, based on the documentation snippet I read, but it may work since that answer's been out there a while.


How to grep text which is always changing from a line with particular text?

Use awk:

awk '/finally wfid is :/{print $NF}'

... which prints the last field of the line containing finally wfid is :.


How to set a default file manager for qt's app?

Problem solved by uninstalling the following packages : kdelibs5-data kde-style-qtcurve

sudo apt-get remove kdelibs5-data kde-style-qtcurve


This can be done with CCSM's Window rules.

CompizConfig Settings Manager (CCSM) is available in Universe section of repository, so allow the repo. and install it using:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo apt-get update
sudo apt-get install compizconfig-settings-manager

The Steps:

Start CCSM, and go to Window Management. Check mark Window Rules and click;

Under the Matches tab, click the + button next to the Maximized field so that Edit Match window appears;

In the Edit Match window, select the Type you want and use Or for the Relation. Next open the the target application which you want to start maximized each time it is called (in the example snapshot below I'm using Chromium browser as the new target; I've already added Software Centre to the rule). Then click the Grab button in Edit Match window so that a reticle or crosshair appears; move it over and click on the target application's window. The proper value should then appear in the Value field, and click Add;

That's it, you can add more applications to the rule or reset by clicking the reset button next to + icon.

Similarly you can set the rules for Fullscreen, Non Movable windows, etc.

You can also specify custom sizes for application window under Window Management -> Window Rules -> Size Rules.


Ubuntu uses /media as default place for automount, so you can just use a hack for your problem.

sudo ln -s /media /path-to-your-dir

Now whatever the usb is mounted then it will be listed in some dir inside your dir stated above.

This is some hack, maybe you can find better answer.


SFTP for 2 different accounts in Ubuntu Server 14.10

You can give A2 execute permission to /var/www/html, this lets him cd or use a SFTP client to open the folder, but without read or write permissions, he cannot edit any files, or even list the folder's contents.

To accomplish this, firstly give A1 read/write/execute permission, and other/public (anyone who can log into the system). Because by default, root owns the /var/www/html, so we need to set the folder's group to A1, and set the permissions

sudo chgrp A1 /var/www/html
sudo chmod 771 /var/www/html

This allows anyone to go into the /var/www/html, but not edit or view the content folders. You can enter sub directories if you know their name, and have execute permissions. Next we should create a folder for A2. Set A2 as the owner of the folder, and set A1 as group and give him/her full permissions.

sudo mkdir /var/www/html/subfolder
sudo chown A2:A1 /var/www/html/subfolder
sudo chmod 771 /var/www/html/subfolder

Now only A1 can list and edit the files inside /var/www/html, but A2 has permission to go into /var/www/html/subfolder, because (1) he has the execute bit, and (2) he knows it exists.


UCK unfortunately, is discontinued! Although there are several alternatives to UCK. I personally find that SUSE studio also does not work. There are several alternatives that can be found here but I would recommend this which is LinuxRespin which is not limited to Ubuntu. Hope it Helped.


Can I prevent X from crashing when I unplug my external monitor?


After many tries and errors I reached a conclusion. Nowadays desktop distoros based on Linux  are not compatible enough with all the possible combinations of hardware. I strongly believe that one day a Linux distro with the compatibility of Windows, ease of Mac, speed and power of open source kernel will be made. But today is not the day, so the only possible solution to my answer here is to go back to Windows... I just bought Win 8.1 license. Maybe I will dual boot with Debian. For now, farewell  Ubuntu. Looking forward for more compatibility. :)


Terminal doesn't go to /home/username/downloads

The core of this question: Directory names are case sensitive. Type cd /home/username/Downloads instead of lowercase.

Additional information

Finding out directory names:
You can use ls to list files and directories in any directory , to see their names. For instance, on a fresh install,  you most likely would find the following directories

$ ls /home/newuser
Desktop/    Downloads/        Music/     Public/     Videos/
Documents/  examples.desktop  Pictures/  Templates/

See how they are all capitalized? This is not the case with most of system directories, such as /etc or /bin. Traditionally, Unix/Linux commands and directories are all lower-case, though it's not a rule set in stone.

And by the way, there is dir, same as in Windows' cmd, a command which performs the same action - listing files in your current working directory.

There is an alternative: many file managers support an Open Terminal Here or Open in Terminal option. Nautilus, the default file manager for Ubuntu, does not have this feature by default as of 14.04 LTS, however there is a plugin you can install to enable this feature or use some work arounds. Refer to this question and answers to it for more information on opening a terminal from the file manager.

Navigating in Terminal

In order to navigate around your home directory, there are two "shortcuts", one is cd $HOME/Downloads and second is cd ~/Downloads.

In  the first case, $HOME is an environment variable. If you run env | sort or set | sort you will see a long list of values sorted alphabetically, among which you will see a line HOME=/home/yourusername. When you run cd $HOME/Downloads the shell automatically expands $HOME to mean /home/yourusername and adds it to whatever else comes after $HOME.

For the second case, ~ also automatically gets substituted with the path to your home directory. There is a historical reason for this particular character to represent the home directory

There are also  a few tricks with cd command to make navigation even easier. cd - works kind of like a go back button in a browser; if you are in one directory but want to return from where you came and do not want to type full path, just enter cd -. For instance, if I jumped from /home/Serg to /etc, I can go back to my home folder by using that cd - command.

cd .. will let you go up one directory. For example cd .. from /home/Serg will  bring me up to /home.

And what if you want to jump from anywhere back to your home directory ? Just run cd by itself.

Hitting TAB will give you some suggestions on where to navigate, kind of works like auto-completion.

Occasionally you may want to enter a hidden directory with your settings, which will be initialized with a single dot, e.g. .config in your home directory. You might want to list them with ls -a. Of course you will need to type it exactly as it is listed , cd .config

And what if a directory has space or special characters in it? Again, use TAB button, or type everything by yourself, prepending spaces with backslash, e.g. cd Folder\ With\ Spaces\ In\ Name

Suggestion: Invest in a book with basic information on linux or shell programming. In my case, I found very helpful Ubuntu Linux Toolbox  and Unix Shells by Example. The power of Linux lies exactly in command line.

And the most important tip - have fun with it all, love what you do!


You need to either escape it:

\#

or quote it

"#"

or

'#'

For some config file formats you won't need that as it is only considered a comment when the # is at the beginning of a line, e.g. Apache config files.

  Lines that begin with the hash character "#" are considered comments, and are ignored


Samsung Galaxy Book S (Intel) - Ubuntu 20.1 cannot get keyboard/mousepad to work

I've the same issue: I started the ubuntu live USB stick and keyboard, touchpad and touchscreen doesn't work.
If I connect an external USB-C hub and plug an external keyboard and mouse, everything works. Ubuntu is very fast and responsive on this machine (compared to the preinstalled Win10).
I finished the installation, as suggested in another post, but mice and touchpad are still not working.
I tried with three different versions of Ubuntu: 20.04.2 - 20.10 and the newly released 21.04. Same behaviour on all of these three versions.
I tried also to investigate in Windows 10 device manager, to see if there is a manufacturer for the touchpad and/or keyboard (i.e. synaptic for many laptops), but all of these devices are shown as "Generic HID device".
Any suggestion?


Will Ubuntu format and erase the partition I intend to install it on?

Given that setup, I would resize the existing partition with the data on it to be smaller, then install Ubuntu into a new partition in the new free space.

I think this would be less risk, and would allow Ubuntu to be installed on a more Linux friendly filesystem (EXT) than the existing Windows (NTFS/FAT) partition


Answered here:

Wifi problems with rtl8723be in Ubuntu 14.04

Also, if you head to GitHub you can see the files:

https://github.com/lwfinger/rtlwifi_new/


Cannot find device "eth0". Failed to bring up eth0

I suggest that you amend your /etc/network/interfaces file to read:

auto lo
iface lo inet loopback

auto ens160
iface ens160 inet static
address 192.168.15.141
netmask 255.255.255.0
gateway 192.168.15.1
dns-nameservers 192.168.15.1 8.8.8.8

Restart the interface:

sudo ifdown ens160 && sudo ifup -v ens160

Did you connect?

ping -c3 www.ubuntu.com


Found the solution by myself :-)

$ xmodmap .Xmodmap

The .Xmodmap file should contain the following:

! Swap Mod1 and Mod5
!
remove Mod1 = Alt_L Meta_L Alt_L Meta_L
remove Mod5 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keysym Alt_L Meta_L Alt_L Meta_L = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keysym ISO_Level3_Shift NoSymbol ISO_Level3_Shift = Alt_L Meta_L Alt_L Meta_L
add Mod1 = Alt_L Meta_L
add Mod5 = ISO_Level3_Shif


Verify if the process is running: ps -ef | grep foxitreader

Kill the process

Try to open foxitreader again


I'm sorry to let you know that AFAIK, Facetime is only available on OSX and iOS.
I am yet to find a third-party client that can connect to that network.


To install the NVIDIA driver execute:

Latest version :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-352

Long Term supported version :

sudo apt-get update
sudo apt-get install nvidia-346

For Optimus support:

sudo apt-get install nvidia-prime

You can test both drivers. I currently use version 352 which contains a lot of bug fixes but it can be a little more unstable (I never had a single problem).
Version 346 is a little bit older but long term supported.


How to tell which image file is being used as Wallpaper in Wallch

you can use script like this:

#!/bin/bash
notify-send -i "terminal" "current-background" "$(gsettings get org.gnome.desktop.background picture-uri)"

generally you can get current wallpaper location by this command entered in a shell gsettings get org.gnome.desktop.background picture-uri


There are three new shortcuts:

  Tab - 11.10+ only - Move to the next lens (When the dash is open)
  Shift-Tab - 11.10+ only - Move to the previous lens (when the dash is open)
  Alt-` - 11.10+ only - Switch between an application's windows. Hitting this combo when you're already focused on an application will automatically switch only between the windows for that application. The ` key on US layouts, but Unity will use whichever key is above your Tab key. (More info) (Video)

They are all listed here:

What are Unity's keyboard and mouse shortcuts?


Openstack deployment fails at 99% Configure Availability Zones

can you please show us the contents of /var/log/landscape/job-handler-1.log on the landscape/0 unit? It should have a more complete description of what went wrong.


The crontab -e file should be:

*/1 * * * * /home/temp/temp.sh

Make sure that temp.sh has execute permission to create temp.txt using chmod +x temp.sh.

Also add shebang and cd to the output diirectory in the temp.sh file

#!/bin/sh
backup_dir=`date "+%Y-%m-%d-%H-%M-%S"`
cd /home/temp/
echo $backup_dir >> $PWD/temp.txt


open the Terminal window and type in the below commands.

sudo apt-add-repository ppa:cinelerra-ppa/ppa

sudo apt-get update

sudo apt-get install cinelerra

In Ubuntu 12.04 replace the last command by

sudo apt-get install cinelerra-cv


This type of problems usually happen when you have invalid permissions on font files. The solution lies in detecting the font file and correcting its permission.

Since, Most of the font files reside in /usr/share/fonts, you can apply a generic fix on them.

First make root the owner of all files and dirs in /usr/share/fonts/

sudo chown -R root:root /usr/share/fonts -v

Then change all folders visitable by fixing permissions on them

find /usr/share/fonts -type d -exec sudo chmod -v 755 {} +

Then use this command to fix permissions on font files.

find /usr/share/fonts -iname '*.[ot]tf' -type f -exec sudo chmod -v 644 {} +

This command lists all files with .ttf and .otf extension and change the permissions of them to 644, required permission bits for fonts.

You can use this command to change all files permissions to 644.

sudo chmod -R a+rX /usr/share/fonts


Try this:
open a terminal by pressing the following keys simultaneously; ctrl, alt, t,
then enter the following:

(if you want to paste in the terminal you need to use ctrl, shift, v ).

sudo apt-get install ubuntu-desktop

press enter.

This will reinstall all default packages.


Forgot the name of a program which allows for quick terminal commands on key press


No upgrade option when booting from USB (12.04)

Do you have a working internet connection after booting the live cd/usb?

I found the option was greyed-out for me too due to not having a working internet connection (the wifi was dropping in/out).

I connected via ethernet, rebooted the live USB and then the upgrade option was no longer greyed out. I suspect the upgrade option requires a network connection because not all packages are available in the live cd/usb image, as commented on in this answer:  Can i update from "ubuntu-12.04-desktop-i386.iso" file?


DHCP server won't start. Gives 'Not configured to listen on any interfaces!' even when configured

Your /etc/default/isc-dhcp-server file should have

INTERFACES="eth0"


11.04 reached end of life on 10/28/2012.  That is why you are unable to install anything at this time.  I would suggest you install the newest version 14.04 which will be good through April 2019 or 12.04 which is supported through April 2017.  Also, you will need to install xorg once you have your server version installed.  You would also want to install a graphical desktop too.  This page shows how to start with a server installation and get a lightweight desktop installed on top of it.  First though, you should install a supported version so you continue to get needed updates.


installed upstart-sysv package and now my system loads of to blank screen

The following worked:
Enter grub console by pressing ESC on poweron
grub> insmod linux
grub> linux /vmlinuz root=/dev/sda3
grub> initrd /initrd.img
grub> boot
Then i installed the default systemd-sysv package again and rebooted.
sudo apt-get install systemd-sysv


You can run:

    jobs -l

Which will show you a list of all backgrounded processes and their PIDs.


I don't have a direct answer, but I suspect connection issues from your original paste.  So I'll just answer with some general troubleshooting tips.  Let's check it out.  Update your answer with more details as you find them.

Back off to just Juju and MAAS

Follow the setup instructions (you can even do this on your maas server).

Then:

juju switch <maas_environment>
juju bootstrap -v
juju deploy cs:trusty/ubuntu
juju add-unit -n <number of unused machines> ubuntu

Make sure everything comes up OK.

Try fetching the key across all machines with juju run

juju run --all '<that sudo apt-key command>'

My suspicion is one machine or more will fail, and you can troubleshoot network connectivity from there.


Unable to open sites through domain names in squid proxy server

You have to define the allow rule before the deny ACL.


Lenovo B590 doesn't see external microphone

Try options snd-hda-intel model=sony-nomic.  The pin configuration for the headset mic (/sys/class/sound/hwC0D0/init_pin_configs: "0x18 0x03a11830") claims that it supports presence-detection, but it doesn't.


document file doesn't want to open anymore. What to do?

You may need to open the document from inside Libreoffice, instead of from the Files Explorer.


You could set two variables one for correct answer count and the other for wrong answer count with an initial value of zero then increment them. Also, you might want to use a while loop to ask for input again if an invalid value is interred like so:

#!/bin/bash

correct=0
wrong=0

echo "Q:1 What does CD command do? ************"
echo "  1)Change directory "
echo "  2)Change File"
echo "  3)Change OS"
echo "  4)None of the Above"

while read n

do

case $n in
  1) echo "correct answer"; ((correct++)); break;;
  2) echo "Wrong Answer"; ((wrong++)); break;;
  3) echo "Wrong Answer"; ((wrong++)); break;;
  4) echo "Wrong Answer"; ((wrong++)); break;;
  *) echo "invalid option. Please try again"; ((wrong++));;
esac

done

echo "Q:1 What does SU command do? ************"
echo "  1)Change user "
echo "  2)Change File"
echo "  3)Change OS"
echo "  4)None of the Above"

while read n

do

case $n in
  1) echo "correct answer"; ((correct++)); break;;
  2) echo "Wrong Answer"; ((wrong++)); break;;
  3) echo "Wrong Answer"; ((wrong++)); break;;
  4) echo "Wrong Answer"; ((wrong++)); break;;
  *) echo "invalid option. Please try again"; ((wrong++));;
esac

done

echo "$correct";
echo "$wrong";

The break will break the current while loop and move to the next question if 1,2,3 or 4 is provided as input or the loop will continue asking for input until a valid option is entered ie. 1,2,3, or 4

I think you'll find it easy to figure out the total score now.


How can I search for a package which provides an uninstalled command?

Install apt-file

sudo apt install apt-file

Perform an initial update of its database

sudo apt-file update

Then (for example)

$ apt-file search 'bin/xclock'
x11-apps: /usr/bin/xclock

See also How do I find the package that provides a file?


Copy and paste not working in ubuntu in virtual box 6.1.2

I cannot comment but when I used Windows 8, VM 5 and Ubuntu 18, I also had issues, and had to apply fixes, like:

sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r)
sudo apt install virtualbox-guest-x11
sudo VBoxClient --clipboard

Have you run these?
Now I try with Win 10, VM 6, Ubuntu 20 like you, and nothing helps...


I've found the solution to this problem in the German Ubuntu forum. It is quite simple:

Install the package lib32stdc++6 and you're good to go.

sudo apt get install lib32stdc++6

One addition: to make use of custom sized labels, have a look at
brpapertoollpr_ql570, which can add media size definitions to your printer configuration.

Regards

Dirk


Vagrant/VirtualBox - how to run GUI program from within VM

I believe you are referring to Ubuntu when you mean

  "how do I run those programs from within the VM"

In that case, check the link here for the steps to install Sublime Text through Terminal. If this doesn't answer your question, kindly brief what I have missed.


VSFTPD Passive Mode doesn't work Behind NAT

Late answer, but here goes:

I have all the options turned on like you. It is required, but still won't work.

pasv_enable=YES
pasv_min_port=xxx
pasv_max_port=yyy
pasv_address=

After these 2 lines change, it is working

listen_ipv6=NO
listen=YES


Is there any problem if i copy ubuntu partition to any other partiotions?

I don't exactly get what your trying to say, but I'm guessing you want to reinstall Ubuntu to a different partition and keep all of your settings, programs and files.

So what you should do is:

Boot up your Ubuntu installation and create a back-up using the back-up utility you can find in the System Settings.
Shut down after backing up your system and boot up the live-usb.
Go in to Live Mode and start GParted.
MAKE SURE YOU HAVE EVERYTHING BACKED UP and then delete your existing Ubuntu partition. (And create a new one/swap around others, if necessary.)
Then reinstall Ubuntu with the installer.
Then on your new Ubuntu installation put back all of your settings, programs and files with the back-up utility.


Lost supplementary user groups for GUI login session

This seems to be a lightdm / kwallet bug, see here: https://bugs.launchpad.net/lightdm/+bug/1781418 and here: https://bugzilla.redhat.com/show_bug.cgi?id=1581495

Commenting out

auth optional pam_kwallet.so
auth optional pam_kwallet5.so

to

#auth optional pam_kwallet.so
#auth optional pam_kwallet5.so

in /etc/pam.d/lightdm - as suggested in the link above, solves the problem for now.


Upgraded Ubuntu from 14.04 to 16.04, hangs on boot, can use recovery mode but unclear what's actually broken

I fixed this by removing the second console from the following line (which loads the Linux kernel) in the GRUB configuration:

linux   /boot/vmlinuz-4.4.0-64-generic root=UUID=52c57bc3-f866-48d7-8cea-3e5fa835e51d ro  console=tty1 console=ttyS0

(feel free to comment on which combinations of consoles are permissible and why, if you know - e.g. I'm aware you're not allowed ttyS0 and ttyS1 together because they're the same type.)

Initial temporary fix:

In Grub menu, ensure default 'Ubuntu' entry is highlighted
press e to edit it
use arrow keys to edit the line
press Ctrl-X to save and boot (it's an Emacs editor)

Permanent:

edit /etc/default/grub (the GRUB_CMDLINE_LINUX_DEFAULT= line)
run sudo update-grub to regenerate /boot/grub/grub.cfg, the file that's actually read by GRUB
reboot

You might have the situation I did where the /etc/default config had become out of sync (i.e. out of date) compared to /boot/grub/grub.cfg, so editing the former created new errors in the latter.  Taking regular snapshots each time you have a working machine will save you time.

Other issues I had:

MySQL packages (mysql-client and mysql-server) needed to be reinstalled because 16.04 uses a newer version.


Try the command:

dconf write /org/gnome/desktop/sound/event-sounds false


After trying out aplay -L I concluded it is just a soft problem.

Someone recommended pavucontrol. With the help of this little tool I was able to fix the problem and re-enable my headphones.


How to run a client-server application on virtual machines running on different computers?

You have two options from a networking perspective:

Lots of NAT.  By default, I assume your VMs are set to use NAT mode in whatever virtualization solution you have, which makes this a little tricky.  Doable, but tricky.
"Bridge" the VMs to the actual network that the host systems are on as well, which removes the NAT headaches.  This is the easier option.

Option 1: VM Networking in NAT Mode

  NOTE: I have never gotten this to work reliably, I have always used Bridged mode which is far more reliable.

VMware and VBox both are set up to permit NAT, and port forwards.  This is all fine and dandy, but there's some headaches this brings.

VMWare

You cannot easily set up NAT port forwarding unless you have VMware Workstation Pro.  This is because the virtual network editor for NAT port forwards is not shipped with Workstation Player or the older VMware Player software versions.

Assuming you have the Virtual Network Manager/Editor though do the following on the system that has the VM that will be the 'server':

(1) Open the Virtual Network Manager / Editor, and select the one adapter with "NAT" as the "external connection" listing.  It'll look something like this image shows:

(2) Select "NAT Settings", and you'll get a window like this one:

(3) Under the "Port Forwarding" area, click "Add".  You get a window like this one:

Set the information as follows:

  Host Port: Likely to be the same port you're having the Server listen
  on in the VM, but it can be something else if you want.

  Type: TCP or UDP is dependent on your server and how it listens.  Safe
  to assume TCP here, though, most active-connection server things are
  TCP.

  IP Address: The IP address of the VM.  You can get this with ip -4 addr list from inside the VM on the command line.

  Virtual Machine Port: The port that the server application will be
  listening on.

  Description: A description of what this port forward is for.

You'll probably have to shut off your VM temporarily, and restart the VMware services with sudo systemctl restart vmware so it reloads all the port forwarding/bridging rules.

(4) Start up the VM with the server on it.  From the Client VM, make sure you tell the Client to connect to the IP Address of the computer that is running the Server VM (so if the laptop with the Server VM on it has IP address of 192.168.250.20, the Client VM's application should try and connect to 192.168.250.20.)

Note that this will not work in all cases, and I strongly recommend the use of Bridged mode instead.

VirtualBox

I have never gotten VBox NAT network port forwarding to behave.  If you are using VBox, I strongly suggest you use Bridged mode instead of NAT.  (While this doesn't clearly answer for VBox, I tried testing these Port Forwards from VBox and couldn't get it to work at all).

Not that I didn't try, but on 16.04, VirtualBox was not able to connect outbound to anything, and never set up any virtual network interfaces for NAT capabilities; I assumed then that it can't work right without Bridged but I can't find why it never brought up NAT capacity.

Option 2: VM Networking: Bridged Mode

You will need to run the VMs in "Bridged" mode and then use IP addresses from your own LAN/Wifi network that are assigned to the VMs (as a result of "bridged" allowing the VMs to connect to and look like they're on the actual network of the host computers).

Firstly, configure the VMs on both systems to use the "Bridged Network" mode.  How this shows will be different from VM solution to VM solution, but it'll always say "Bridged" or similar (at least, in VMware or VBox).  Make sure the device that you're "bridged" to is your preferred network card (wifi or ethernet), so you're properly going out to the right network with the VM for an IP address.

Secondly, reboot the VMs if they're already online.  This should get them a brand new IP address from the same network as the host machines.  (It should be in the same subnet range even).

Thirdly, point the client of the one VM to the IP of the server on the other VM.  Because the networking is Bridged, it should just connect.  You may have to tweak the VMs on the guests to make sure it permits connections though.

That should be it then, for the VMs, and they should be able to interconnect without issue.


Is it a must to download and install all packages when install Ubuntu 12.04?

I'm not sure if "Downloading" in this part of the dialog isn't rather refering to "downloading" from the CD. Normally you would have selected "Download Updates" on the first page of the dialog.

Only downloading the updates can be a lot of data however. If you are using third party components like proprietary nvidia drivers, it could be that those have to be downloaded from the internet.

If you leave all option boxes on the first dialog page unchecked, there should be no downloads from the internet at all. If you read the phrase "downloading" then, you can be sure it's refering to copying from the CD.

If you don't download and install updates during the installation, then updating should be the first thing to do after you boot your new Ubuntu.


Again "How to get grub2 to remember last choice?"

My situation was similar. I had a custom grub entry (using a 40_custom file in /etc/grub.d) for a Chromium OS install. I had set GRUB_DEFAULT=saved and GRUB_SETDEFAULT=true, but it never saved the entry. Turned out that I needed to manually put a "savedefault" line into the 40_custom file in order for that entry to save the default. Works like a champ now.


Install gnome-lirc-properties "Infrared Remote Control" from Ubuntu Software Center or

sudo apt-get install gnome-lirc-properties

It will set up the configuration for your remote in lirc and allow you to test the remote.

After setting that up you need to set up your remote with boxee file. Next Boxee needs a config file for the remote. Copy /opt/boxee/system/Lircmap.xml to $HOME/.boxee/Lircmap.xml.

Now open the Lircmap.xml copy that is in the UserData folder, and add the code from this forum post just before the ending  tag:

<remote device="Streamzap_PC_Remote">
    <pause>PAUSE</pause>
    <stop>STOP</stop>
    <forward>&gt;&gt;</forward>
    <reverse>&lt;&lt;</reverse>
    <left>LEFT</left>
    <right>RIGHT</right>
    <up>UP</up>
    <down>DOWN</down>
    <select>OK</select>
    <pageplus>CH_UP</pageplus>
    <pageminus>CH_DOWN</pageminus>
    <back>EXIT</back>
    <menu>MENU</menu>
    <title>PLAY</title>
    <info>More</info>
    <skipplus>&gt;&gt;|</skipplus>
    <skipminus>|&lt;&lt;</skipminus>
    <display>Teletext</display>
    <start>Home</start>
    <record>RECORD</record>
    <volumeplus>VOL_UP</volumeplus>
    <volumeminus>VOL_DOWN</volumeminus>
    <mute>MUTE</mute>
    <power>POWER</power>
    <myvideo>Videos</myvideo>
    <mymusic>Music</mymusic>
    <mypictures>Pictures</mypictures>
    <mytv>TV</mytv>
    <one>1</one>
    <two>2</two>
    <three>3</three>
    <four>4</four>
    <five>5</five>
    <six>6</six>
    <seven>7</seven>
    <eight>8</eight>
    <nine>9</nine>
    <zero>0</zero>
    <mytv>RED</mytv>
    <mymusic>GREEN</mymusic>
    <mypictures>YELLOW</mypictures>
    <myvideo>BLUE</myvideo>
</remote>

Edit the keys for your particular remote.

Save the file and open Boxee, and the remote should now work.


Files written in Ubuntu disappear in Windows

One way to cause this problem is to hibernate your Windows and then use Ubuntu to write files to the NTFS partition. The Windows hibernation file then becomes asynchronous with the new data on the NTFS partition.

One way to loosely verify the this particular problem is just to experiment with it.

Or,  use data recovery software on the NTFS partition without booting into Windows. (That is to say: boot into Windows; hibernate Windows; boot into Ubuntu; write some files to NTFS; shutdown; remove laptop disk, plug laptop disk into another computer via USB, and then use recovery software.) The software will pick up files that may or may not be connected with the master file table (MFT). Then you can see that files are in fact written to the NTFS partition, but Windows does not "see" them after restoring the state of the system at hibernation time.

Also, a chkdsk from Windows on the NTFS partition might reveal problems.

And, aking1012 mentioned sync, which you can do with sudo sync before rebooting to assure yourself that all file system data was flushed to disk for troubleshooting purposes.

Was this the source of the problem? Success?


Software Deployment for Windows Computers?

For anyone wondering and having difficulties:

Novell's Zenworks supports mobile devices, Mac, Windows and Linux.
https://www.novell.com/products/zenworks/endpoint-management/

opsi supports Windows and is Linux Server based.
http://www.opsi.org/en


How to reinstall Ubuntu in the easiest way?

How you re-install Ubuntu over an existing older version depends on if you have /home in a separate partition or as a folder within / partition, the default.

In either case you start the installation process from a live DVD/USB. Proceed until you come to the Installation Type page.

If you have /home in its default location within / partition:

Choose the option: Upgrade Ubuntu 12.04 LTS to 14.04 LTS. This will keep your /home folder. Even though it says "installed software will be kept where possible," in my experience it cleared most of them. YMMV.

If you have /home in its own separate partition:

You can either go with the above choice.

Or you can choose Something else. If you choose "Something else," make sure you check the format box for the / partition and uncheck the format box for /home partition. See below for an example.

Note, in this picture above both the / and /home partitions are to be formatted. Make sure that the format box for /home is unchecked before you proceed. Otherwise you will lose all your data!

This method will format the / partition and all the extra programs you had installed in the older version will be gone. However, the settings saved in the /home will remain. If you decide to re-install some of them, say Chrome, your personal configuration, if any, should be there for the new installation to use.

Removing Cinamon and Lubuntu

It depends on how you installed Cinamon Lubuntu etc.

If you had installed just the cinamon desktop environments (DE) and the LXDE (the DE for Lubuntu) on top of Ubuntu via Ubuntu Software Center, or the apt-get command, then yes. Either method will delete them.

If you installed these from their own LiveDVD/CD/USB in separate partitions, then no. In that case you will have to remove those partitions first. You can remove these partitions either from the LiveDVD/USB, by choosing the option Try before installing and then using gparted. Make sure you don't delete the wrong partitions. At this stage you can move the other partitions around if needed and reallocate the empty space to the version of Ubuntu you want to keep.

Hope this helps


Ubuntu 18.04 freezing randomly with home-built computer

If your RAM tests okay, try changing the NVDIA driver. If your motherboard has onboard video, try removing the video card.


Why does df -h show different information then fdisk -l

You will always have a difference in the output of

~$ sudo fdisk -l
Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda6       378750976 625139711 246388736 117.5G 83 Linux

and

~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda6       116G   61M  110G   1% /media/datam

In my case here I have a difference of about 1.5 GB which is about 1.3 % of the partition size.

To determine the real filesystem size you can use

~$ sudo tune2fs -l /dev/sda6
Block count:              30798592
Block size:               4096

We can see that filesystem and partition have the same size here:

Filesystem size is  30798592 × 4096 = 126151032832 > 117.487304688 GiB
Partition size is  246388736 x  512 = 126151032832

From man df:

df displays the amount of disk space available on the file system

So df does not display the size of the filesystem, it displays the size
 which is available for the users. Some space in the filesystem is reserved for the
filesystem (e.g. Journal) and is not available for the users, thus not displayed.

When I calculate with 1.3% it will give about 10.4 GB difference for a 800 GB partition,
that's pretty near the amount of space you're missing, it's not lost in space, it's
filesystem-overhead.

Note: I stripped the command output in my examples to the relevant lines to keep it tidy.

Space reserved for root:

The reserved space for root is available, but only for the user root. df displays this amount of space as used, the confusing thing is, that df displays the same values wether you run df as root or as another user. In the default configuration 5% of space will be reserved for root (see for the reasons here). It is possible to reduce this amount of space what I think makes sense for your pretty big partition, so more space will be available for other users. Feel free to reduce the space reserved for root to one or two percent with

sudo tune2fs -m X /dev/sda5

Replace X with the desired reserved-blocks-percentage. No need to unmount the partition, this can be done online. If you want to increase the reserved-blocks-percentage you should make sure that enough free space is left on the partition. The change will immediatly take effect.


You need vegam firmware, new kernel 4.18 and mesa-utils amdgpu driver for ubuntu 18.04.

Vegam firmware

git clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/
sudo cp linux-firmware/amdgpu/*.bin /lib/firmware/amdgpu/
sudo /usr/sbin/update-initramfs -u -k all

Kernel 4.18

See this application to install new kernel. https://github.com/teejee2008/ukuu

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install ukuu

Run the ukuu application and install kernel 4.18.17 or most recent one.

Mesa-utils Driver

sudo add-apt-repository ppa:ubuntu-x-swat/updates
sudo apt-get update
sudo apt install mesa-utils

After reboot, to verify if the vega gl is switchable, run the following command.

env DRI_PRIME=1 glxinfo | grep "OpenGL renderer"


Black screen when installing ATI Drivers on Netbook

which driver have you tried to install? catalyst or catalyst-legacy? I think your card needs the catalyst-legacy driver which currently does not support xorg 1.13!
To find out which version of Xorg your using, open a terminal window and
type Xorg -version.
If you have xorg 1.13 you can try downgrade to xorg 1.12 or wait until AMD updates the catalyst-legacy driver to support xorg 1.13.

But anyway why do you need the driver?
Afaik lubuntu doesn´t need 3-D support, the opensource-driver should work well...


You can use an easy-to-use the GUI application called Grub Customizer to make your life a little bit easier. As the name suggests, you can do much more than just reordering GRUB menu entries with it.

You can install it by:

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

(See Ask Ubuntu question Are PPA's safe to add to my system and what are some “red flags” to watch out for?.)

There is an How-To Geek article about it, How to Configure the Linux GRUB 2 Boot Menu the Easy Way. Take a look at it if you're interested. Also, there is a solved thread on the Ubuntu Forums, Change boot order in GRUB 2 that mentions this tool.

Here are some screenshots:

Some troubleshooting:

The Grub Customizer settings may work only from within the latest Linux/Ubuntu installation, the one that installed the Grub.

For example, if somebody has two OS-es installed (Windows and Ubuntu), and then installs a third OS (Manjaro, etc) and then tries to follow the above answer, Grub Customizer changes will not work when made from the second OS (Ubuntu, in the example). The program has to be installed in the thirs OS, as it seems that Grub Customizer can only edit the Grub files created by the installation of the system on which itself is installed.

The files that determine the Grub boot menu come in most cases with the latest system installed on a machine, so Grub Customizer has to be installed and used from that Linux system.


If you copied the files onto the hard drive using Mac OS X, it is possible that the file system is HFS+. Linux doesn't support journaling on HFS+ so Ubuntu will not mount it automatically. Searching the Internet, I see that there are ways of disabling the journaling so that Ubuntu can mount it but I cannot recommend doing this as the solutions appear to me as dangerous hacks. In my opinion the best solution is to find a friend with an Apple computer and copy the files over the network.

To check what filesystem the hard drive is, run the following command after plugging it in:
sudo fdisk -l


Here's the way I "wait for the network to go down, then do something":

#!/bin/bash
# Monitor for the net going down, Do The Next Thing (from a config file)
# to bring the net up. Implicit assumpition that The Next Thing fixes it
# may be a problem.
# Walt Sullivan

# Note: places where you may need to adjust things to match
# your environment/taste are marked "#Adjust"

# determine my name
me=$0
me=${me##*/}

# my variables
debug=0             # set via --debug
verbose=0           # set via --verbose
original=""         # set the <config.file>
original_update=0       # time <config.file> was last modified
config="/var/tmp/${me}.$$.config" # my writable copy of config
result=""             # temporary use

# $ dpkg -S $(type -p nm-online)
# network-manager: /usr/bin/nm-online
# $ dpkg -S $(type -p ip)
# iproute2: /sbin/ip
# man ip-link;man ip-monitor;man ip-address;man 7 regex

# -h or --help or something's wrong in here
help () {
    echo "${me} [-h|--help] [-v|--verbose] <config.file> " >&2
    echo "" >&2
    echo "Monitor the wireless network, and when it goes down, Do The" >&2
    echo "Next Thing (as specified by the <config.file>), to bring" >&2
    echo "the wireless net up." >&2
    echo "" >&2
    echo "The <config.file> contains #comments, blank lines, AND" >&2
    echo "single line commands, of your choice, to correct the" >&2
    echo "wireless network down condition. The first command in the" >&2
    echo "<config.file> will be executed the first time the net goes" >&2
    echo "down (or if the net is down when ${me} begins), the second" >&2
    echo "command will be executed the next time the net goes down," >&2
    echo "and so forth, wrapping around at the end. The number of" >&2
    echo "single line commands in the <config.file> is unlimited." >&2
    exit 2
}

function flip () {
    # Return the first non-blank, non #comment line,
    # and move that line (and all preceeding blank and #comment
    # lines) to the end of (our copy of) the config file.
    #
    # ed pattern includes "/", but not "~" or "."
    #Adjust the ed pattern in both places and in countconfiglines
    ed --quiet "$config" <<EndOfEd
/^[A-Za-z0-9\/]/
1,.t$
1,/^[A-Za-z0-9\/]/d
wq
EndOfEd
}

function countconfiglines () {
    # return number of config file lines
    #Adjust must match the ed pattern in flip()
    configfile="$1"
    egrep --count '^[[:alnum:]/]' "$configfile"
    }

function up-to-date () {
    # updates configuration file if necessary
    new_update="$(/usr/bin/stat --format='%Y' $original )"
    if [[  "$new_update" -ne "$original_update" ]] ; then
    if [[ $(countconfiglines "$original") -eq 0  ]] ; then
        echo "Invalid configuration in $original" >&2
        exit 4
    else
        /bin/cp --force "$original" "$config"
        original_update="$new_update"
    fi
    fi
    }

function netstate () {
    # Return network state as "UP" or "DOWN"
    #Adjust how you decide net is UP/DOWN
    ip link show | egrep -q 'UP,LOWER_UP.* state UP'
    if [[ $? -eq 0 ]] ; then
    echo "UP"
    else
    echo "DOWN"
    fi
}

# Execution begins here

# parse the args with getopt, adapted from
# /usr/share/doc/util-linux/examples/getopt-parse.bash

TEMP=`getopt -o dhv --long debug,help,verbose \
     -n "${me}" -- "$@"`

if [[ $? != 0 ]] ; then echo "${me} --help for help." >&2 ; exit 1 ; fi

# Note the quotes around `$TEMP': they are essential!
eval set -- "$TEMP"

while true ; do
    case "$1" in
    -d|--debug) debug=1; shift;;
    -h|--help) help; shift;;
    -v|--verbose) verbose=1; shift;;
    --) shift; break;;
    *) echo "Internal error! ${me} --help for help";exit 1;;
    esac
done

# Did we get the <config.file>?
original="$1"
shift
[[ -z "$original" ]] && \
    (echo "Missing config file ${me} -h for help" >&2 ; exit 1)

# If there are more parameters, confusion exists in the mind of the caller
[[ "$#" -ne 0 ]] && help

[[ -r "$original" ]] || (echo "${me}:Cannot read $original" >&2
                exit 2)

if [[ $(countconfiglines "$original" ) -eq 0 ]] ; then
    echo "${me}:Invalid configuration in $original" >&2
    exit 4
else
    # watch for changes, record "%Y time of last modification,
    # seconds since Epoch"
    original_update="$(/usr/bin/stat --format='%Y' $original )"

    # make a writeable copy for our use, and clean it up at the end
    # unless $debug
    [[ $debug -ne 0 ]] || trap "/bin/rm -f $config" EXIT
    /bin/cp --force "$original" "$config"
fi

# if the net is down, Do The Next Thing right away
#Adjust: how you decide the net is up or down?
[[ "$(netstate)" = "DOWN" ]] && \
    ( result="$(flip)";
    [[ $verbose ]] && echo "$(date):$result" >&2; \
        eval "$result" )

# Wait for the net to go down, then Do The Next Thing
#Adjust find a better way to watch for net down
ip monitor address | \
    egrep --line-buffered \
    '^Deleted [[:digit:]]+: [[:alnum:]]+[[:space:]]+inet[[:space:]].* scope global ' | \
    while read line ; do
    up-to-date
    result="$(flip)"
    [[ $verbose -eq 1 ]] && echo "$(date):$result" >&2
# Here is where "The Next Thing" is Done
    eval "$result"
done
# we never exit the while loop, until the world ends.
exit 0


I shut down my computer and booted it up in Windows 10. Then I shut it down again and booted it up in Ubuntu and this seems to have fixed the issue. However just turning it off and back on again without booting to Windows first did not fix the issue.


To get a folder's path you can use the same as for files, but adding the --directory option.

  So you can run:

  zenity --file-selection --directory

  and then you'll obtain the path of selected folder.

You can get more info about these options issuing zenity --help-file-selection on terminal.


:)

I have had this problem too.

In my case, it was an issue with the brightness level of the screen.
What i had to do, was to turn up the brightness, using the "fn" keys.
For the record my laptop is a HP Pavilion g6, and the issue was fixed in a later update.
This might just be your issue. :)

PS: Please remember to rate, if this helped you. :)


Conky $mem/$memmax RAM report differs from free -m command

From the sources it seems that info.mem is calculated as info.memmax - memavail where these are read from /proc/meminfo in fields:
    if (strncmp(buf, "MemTotal:", 9) == 0) {
      sscanf(buf, "%*s %llu", &info.memmax);
...
    } else if (strncmp(buf, "MemAvailable:", 13)
      sscanf(buf, "%*s %llu", &memavail);

To call free from conky you can use, for example,

RAM: ${execi 10 free --si -m|awk '/^Mem/{printf "%.2fGiB\n",$3/1024}'}/$memmax   \
${execi 10 free --si -m|awk '/^Mem/{printf "%.1f%%\n", 100*$3/$2}'} \
${execibar 10 free --si -m|awk '/^Mem/{print 100*$3/$2}'}

but the size of the bar generated by execibar is fixed by global variables you have to set in the conky.config part with:
default_bar_height = 4,
default_bar_width = 100,

The output of free is is passed to awk which looks for the line beginning Mem and takes the 3rd ($3) word on the line and reformats it (see man sprintf). You can set the number of decimal places in the format %.2f by changing the number 2.


Try command mv <Old_directory_Name> <New_Directory_Name>

e.g.: mv test_Old test_New

Hope you only want to change the directory name.


How can I get my Netbook upgrade to 11.10 to use the new system button?

In general your icon theme looks outdated. Open the system settings and change the theme to high contrast, then back to Ambiance.

If that doesn't fix it, then run:

sudo apt-get install --reinstall ubuntu-mono humanity-icon-theme.

If the theme does not automatically update, change the theme as mentioned above.


Wi-Fi 6: WPA3-Personal authentication on Ubuntu 18.04 LTS

Please see these bug reports: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1844422 and also: https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/1848339 WPA3-SAE capability is included in Network Manager version 1.20-2 and associated packages.

I know of no way, however, to reliably install the later versions of Network Manager, wpa-supplicant, et al on to Ubuntu 18.04 LTS.

I recommend that you install a fully updated version (Ubuntu, lubuntu, kubuntu, etc.) of 19.10. I suspect that WPA3-SAE will then work properly.


outdated stunnel,openssl versions Kubuntu 14.04

In the versions in the official repositories, all known security vulnerabilities are fixed, so if you are only concerned about security you can just stick with the Ubuntu version. If you have a particular vulnerability in mind, you can read the Ubuntu changelog (in /usr/share/doc or on http://packages.ubuntu.com, for example) to confirm that it is fixed in the Ubuntu package.

You may, however, want new features not available in the Ubuntu version, and in that case upgrading yourself is necessary, for example with repositories provided by the developers as in the case of OpenVPN.


This error indicates that there is something wrong with the ELF, that is to say the header of the /usr/lib/x86_64-linux-gnu/libnm-gtk.so.0 binary file you have installed one possible reason for this could be that the file is corrupt. Since this file is installed by the libnm-gtk0 package you could try the following command to reinstall it in case it is corrupted.

sudo apt-get install --reinstall libnm-gtk0

The other likely candidate for this error would be if you have somehow installed amd64 packages on a 32 bit (i386) version of ubuntu since the 32 bit kernel will not recognise the ELF64 (64 bit binary) as being a valid ELF header which would produce this error also perhaps if the above doesn't fix the problem you should add the output of the following command to your question:

uname -a

That will print out some information about your kernel and platform that could help diagnose the issue further.


Can't get full resolution with Dell U3011 monitor

Intel graphics does not support dual-link, therefore 1920x1200 is the
maximum for DVI and HDMI, 2560x1440 is only possible with a
displayport port. This is stated in every specification sheet.
http://communities.intel.com/message/189170

Have you tried a DisplayPort cable? I use one VGA and one DisplayPort with my X220 successfully (although with two monitors, not one large one).


Shell script to SSH into another server and execute a script there

You should combine two related Ask Ubuntu answers, one for logging into SSH via specific port and one for running commands on remote server , into one script. Of course, you'd need to have some form of data-structure to hold server+port correspondence. That could be either bash associative arrays or with POSIX shell script - a case statement. Assuming your username on all hosts is the same, we could come up with something like this:

#!/bin/sh
# bar host has ssh server on port 22, while baz - on port 2222
host_port(){
    case "$1" in
        "bar") echo 22 ;;
        "baz") echo 2222 ;;
    esac
}

# set positional parameters of script to hosts and iterate over them
set -- bar baz
for host ; do
    # command substitution will call function,
    # function's return value will be the port number
    ssh ssh://username@"$host":"$(host_port "$host")" -t "systemctl stop tomcat"
done

Now, a giant disclaimer: This is just an example. I don't have 6 servers to test the script, so adapt it to your needs as necessary. If you have different usernames on each host, use another case statement

Side note on logging in: if you have private key, which is accepted by all 6 servers it will be easy to log-in just by adding -i ~/.ssh/id_rsa.  Alternative to that would be to create a ~/.ssh/config file with key/password information for each host. This is described in Lekensteyn's answer. If you're not familiar with SSH keys (and I understand it's kinda confusing topic), you might wanna read ssh.com article on the topic.


You should have lightdm-manager installed. If not then install it by a quick "apt-get install"
Then open lightdm-manager and chose from different icons and themes you want.


Sadly the answer seems to be no.

This seems to be answered in the first answer in this question (though the supporting link doesn't say anything about ubuntu-core, just that Canonical is focusing on a mobile OS): Installing Ubuntu on Nexus 7


Hibernate works in console, not in power menu

I had the same problem and I just fixed it. The reason for this behavior in my case was that /usr/sbin/hibernate script always requires to be run as root and because of this you must type sudo hibernate to run it. When you are pressing a button in the power menu, you are doing it without root privileges. To fix this I did the following:

I added alias hibernate='sudo hibernate' to my .bash_aliases file.
Then I added bobeff ALL=NOPASSWD:/usr/sbin/hibernate to my /etc/sudoers file.

The change in /etc/sudoers is needed to disable requirement to enter password for sudo command when executing /usr/sbin/hybernate script. Of course, you have to put your username instead bobeff. Also you have to make sure that your .bash_aliases file is included in your .bashrc file. Put the following lines in it in the case they are missing.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

This seems to work for me.


How to set up DSL Internet connection in Ubuntu 20.04?

In ubuntu 20.10 you can use nm-connection-editor, Give this a try and let me know
From terminal run this command
nm-connection-editor -s

This should pop a utility using which you should be able to add pppoe or any other type of connection easily.


I would suggest using keys for an automated logon:

https://help.ubuntu.com/community/SSH/OpenSSH/Keys


Déjà Dup won't back up ~/.config/nautilus-actions

Solved my own problem. Answer was here.

TL;DR - Change the folder's permissions by typing $ chmod 755 ~/.config/nautilus-actions in terminal.

I found the answer in a post from 2012. Would be nice to know why this weird bug showed up again.


As I know creating the server's config file on your machine (the server running client tools) doesn't do anything.

Instead of using:

redis-cli -h host -p port -a password

Create an alias:

alais rediscli='redis-cli -h host -p port -a password'

Add it to your .bash_aliases or .bashrc to make it permanent:

echo "alais rediscli='redis-cli -h host -p port -a password'" >> .bash_aliases

.bash_aliases will get sourced automatically by .bashrc.

No you only have to run:

rediscli


Steps are almost same but in Windows we did that using GUI or in Windows Explorer and in Ubuntu we'll do it through terminal or you can say using commands.

Step 1:  Open the command prompt (terminal) and type the following command

cd /var/www/html

Step 2: Type the below command to download the cakephp.

$ sudo wget https://codeload.github.com/cakephp/cakephp/legacy.zip/2.5.2

where 2.5.2 is the latest stable version of CakePHP.

Step 3: Use the following command to unzip the downloaded zip file.

$ sudo unzip 2.5.2

Step 4:  Rename extracted folder.

$ mv cakephp-cakephp-736e999/ cake

where cakephp-cakephp-736e999 is the name of extracted folder.

To run CakePHP on browser use this path localhost/cake.

Step 5: Go to cake folder.

$ cd cake

And change permissions to app/tmp folder.

$ sudo chown -R root:www-data app/tmp
$ sudo chmod -R 775 app/tmp

Step 6: To make script writable perform these steps:

$ apache2ctl -M

If you see mod_rewrite or rewrite_module in the list shown then script is writable. If not then to enable it type this command:

$ a2enmod rewrite

Step 7: Type:-

  cd /etc/apache2
$ sudo nano  apache2.conf

Set these lines in the file:

    <Directory /var/www>
       Option Indexes FollowSymlinks
       AllowOverride All
       Required all granted
    </Directory>

Press Ctrl+X, then press Y and Enter to save the file.

Restart apache:

$ sudo service apache2 restart

Step 8: Now go to app/Config and:

$ cd /var/www/html/cake/app/Config
$ sudo mv database.php.default default.php

Refresh localhost/cake page. Now database file is detected but still we have to create a database as it will show could not connect to database.

Step 9: Open localhost/phpmyadmin on browser. Login using your username and password and create a database named as cake. After this edit database.php file.

$ sudo nano database.php

Set host as localhost, username is your phpmyadmin username, password is your phpmyadmin password and database name.

Refresh localhost/cake page. Now database is detected.

Step 10: To remove the salt and seed error shown on top of the localhost/cake page we have to edit core.php file.

$ sudo nano core.php

Find this section and replace both the strings with any random strings or you can use these strings also.

/* A random string used in security hashing methods. */

 Configure::write('Security.salt','fvjhdj8fvn85grg73fbrvfn9fjFGfnhvt758nADG');

/* A random numeric string (digits only) used to encrypt/decrypt strings. */

Configure::write('Security.cipherSeed', '55857485748594575784348784787475');

Then press Ctrl+X, press Y and Enter to save file.
Refresh localhost/cake page. And its done.


Ubuntu 16.04 can't boot to desktop after creating windows-shared NTFS partition

The problem was that one has to uncheck "fast startup" in Windows 8/10 control panel > power options > shange what the power buttons do (bottom of page. Might have to ckick "turn on disabled options.. something" on the top of the page if the fast option is greyed out). This was not mentioned in the guide.


How to prevent Firefox ever saving state on forced quit?

Type about:config in the address line

In the filter field type : browser.sessionstore.resume_from_crash

Set the value false

Edit your settings , under " When firefox start" set it to "show my home page" or "set a blank page" , do not set " show my windows and tabs from last time "

From The privacy , under History set "Never remember History"


If you want non-root users to be able to mount a record of /etc/fstab, simply add the user option to the respective line of /etc/fstab.
As you have used an option (credentials) already, use comma (without spaces) to separate multiple options. I’d prefer to put user as the first option, so it cannot be overlooked at the end of the path: user,credentials=/home/palomar/.smbcredentials
The whole resulting line (I don’t guarantee that other fields are correct):
//192.168.178.1/fritzbox-nas/ /media/usbplatte cifs user,credentials=/home/palomar/.smbcredentials 0 0

To apply the change, use the command sudo mount -a (or reboot the machine).
See also:
man fstab,
man mount


My issue was in fact related to UEFI/BIOS. In my attempt to make sure Ubuntu was installed UEFI, I actually ended up installing it in Legacy like a dummy.
I can almost guarantee my issue was an old Grub that was still installed. My BIOS settings make it so UEFI is always booted first, which is why my old Ubuntu's Grub would keep appearing when I powered my computer on. The reason boot-repair didn't work was cause I was trying to use it in a incorrectly installed Ubuntu (not UEFI), when the tutorial @Raffles gave me was for UEFI installs only. I of course didn't realize this until afterwards.
All I did to fix: disable "Legacy Support" in my BIOS and then simply reinstall. It installed Ubuntu with UEFI so now I boot directly into it! Thank you to everyone that helped!


You can't take a screenshot on a physical machine during the boot process. You may do it in a VM of course.


Bash script to check whether a package is installed and if not, install it

if [ "$(which gimp)" != ""]

] must be the [ command's last argument, and it must be a separate argument, hence you need a space before it. See Bash Pitfall 10.

But, don't use which. It is a non-standard, external command that looks for a file in PATH. It behaves differently on different systems, and you can't really rely on a useful output or exit status. The shell already provides better ways of checking if a command exists and will work consistently on any system, so better learn those. See Bash FAQ 81. In this case though, you don't need to test if gimp exists, just running gimp -version, or querying dpkg about the version of the gimp package (see dpkg-query(1)), will already tell you whether it exists or not.

if [ "$(gimp -version)" != 2.8 ]

AndAC already gave a solution for this one, but I'll provide another one; comparing the version numbers. dpkg provides a way to compare two versions, namely dpkg --compare-versions ver1 op ver2. E.g. dpkg --compare-versions 2.6.12 '<' 2.8.0-1ubuntu0ppa6~precise will return true since version 2.6.12 is older than 2.8.0-1ubuntu0ppa6~precise. See dpkg(1).

All the brackets ({ and }) in that script are pointless, they serve no purpose, so you might as well remove them.

Putting this all together:

#!/usr/bin/env bash

# Query dpkg to get the version of the currently installed gimp package.
# The command returns false if the package is not installed.
if version=$(dpkg-query -W -f='${Version}' gimp 2>/dev/null); then

    # Check if it's older than 2.8
    if dpkg --compare-versions "$version" '<' 2.8; then
        apt-get remove gimp || exit
    else
        printf 'Looks good.\n'
        exit
    fi
fi

add-apt-repository ppa:otto-kesselgulasch/gimp &&
apt-get update &&
apt-get install gimp


OpenJDK 8 support period in Bionic Beaver 18.04 LTS

Results of the command ubuntu-support-status --show-supported show that openjdk-8-jdk is supported until April 2021 (Community - 3y). To show the same results in a more easily navigable form run ubuntu-support-status --show-supported | less and scroll down with the mouse to the openjdk-8-jdk and openjdk-8-jre support status. In Ubuntu 20.04 and later ubuntu-support-status has been replace by ubuntu-security-status which does not have a --show-supported option.
openjdk-11-jdk and openjdk-11-jre are supported until April 2023 (Canonical - 5y).


Move window from one desktop to another using drag and drop

Developer blogs

http://blogs.kde.org/2013/07/29/kde-plasma-desktop-411s-new-task-manager

  There's also some bad news (with a side dish of glimmers-of-hope)

  Sadly, a few features didn't make it into the new version - yet, at
  least.

  One is the ability to drag tasks from the Task Manager onto the pager...

Workaround

A workaround is to use another task manager - earlier: https://www.kubuntuforums.net/showthread.php?64014-Manual-Grouping-of-Task-Panel-items-no-longer-possible

The old task manager: https://www.kubuntuforums.net/showthread.php?64014-Manual-Grouping-of-Task-Panel-items-no-longer-possible&p=338505&viewfull=1#post338505

The old task manager seems to work with the KDE 4.13.

PPA search: https://www.google.fi/search?&q=plasma-widget-old-tasks+.deb+site:https://launchpad.net/


1) Copying files

You want to copy the FILES, not the whole partition ( including its free space ), so you don't need to resize the partition first.  Boot from the livecd and mount both the HD and SSD ( after formatting a partition on the SSD of course ), then copy all of the files over:

sudo cp -Tax /media/hd /media/ssd

Use the correct names for the hd and ssd mount points of course.  Then you just need to edit the /etc/fstab on the ssd to point to the new fs UUID ( you can look it up with blkid ).  Finally you need to install grub on the ssd.

2) Dealing with GRUB

a) Command line:

sudo -s
for f in sys dev proc ; do mount --bind /$f /media/ssd/$f ; done
chroot /media/ssd
grub-install /dev/ssd
update-grub

Of course, use the correct device for /dev/ssd.  The whole disk, not a partition number.

b) "Recommended repair" magic button in Boot-Repair:

https://help.ubuntu.com/community/Boot-Repair

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

Finally reboot and make sure your bios is set to boot from the SSD.