Is it possible to get a list of most recently installed packages? Is it possible to get a list of packages that were most recently installed through apt-get?

Command to list recently installed packages that were installed via any method (apt-get, Software Center et al.):

grep " install " /var/log/dpkg.log

Example output:

2010-12-08 15:48:14 install python-testtools <none> 0.9.2-1
2010-12-08 15:48:16 install quickly-widgets <none> 10.09
2010-12-08 22:21:31 install libobasis3.3-sdk <none> 3.3.0-17
2010-12-09 12:00:24 install mc <none> 3:4.7.0.6-1
2010-12-09 23:32:06 install oggconvert <none> 0.3.3-1ubuntu1
2010-12-09 23:34:50 install mpg123 <none> 1.12.1-3ubuntu1
2010-12-09 23:34:52 install dir2ogg <none> 0.11.8-1
2010-12-09 23:34:53 install faad <none> 2.7-4
2010-12-09 23:34:54 install wavpack <none> 4.60.1-1
2010-12-10 11:53:00 install playonlinux <none> 3.8.6

You could run this command to list only the recently installed package names,

awk '$3~/^install$/ {print $4;}' /var/log/dpkg.log

Command to list history of apt-get (NOTE: this doesn't list dependencies installed, it simply lists previous apt-get commands that were run):

grep " install " /var/log/apt/history.log

Example output:

Commandline: apt-get install libindicate-doc
Commandline: apt-get install googlecl
Commandline: apt-get --reinstall install ttf-mscorefonts-installer
Commandline: apt-get install valac libvala-0.10-dev
Commandline: apt-get install libgtksourceview-dev
Commandline: apt-get install python-sphinx
Commandline: apt-get install python-epydoc
Commandline: apt-get install quickly-widgets
Commandline: apt-get install libreoffice3* libobasis3.3*
Commandline: apt-get install mc

The problem with viewing the installation history in Software Centre or Synaptic is that it's hard to copy/paste the contents into an email (e.g. when talking with tech support!). The alternative is to view the contents of the log files in /var/log/apt as root.


File system root low disk space I installed Ubuntu Gnome 14.04 a month back. It all worked perfectly but after two days I repeatedly got the notification

  File system root low disk space 0 MB left.

I had installed everything correctly, with root space 21 GB. However, I reinstalled Ubuntu to get rid of this, this time with root as 100 GB. It all worked fine for 20 days. But today I started getting the notification again. File system root low disk space- 1 GB left.

I can't find how to resolve this issue. Why is root filling up so fast? Wherever I read, it says 15-20 GB is enough, but even 100GB is apparently not sufficient in my case!

You can run command in terminal:

sudo du -hs /*

And check which folder takes the most.

Please execute sudo apt-get autoremove to get rid of the old kernels and dependencies that are needed anymore...

this is a hint for normal users - what can cause a root / boot fill up (especially often happening on full encrypted setups cause the standard installation only creates about 100MB root partition).
In your case you could use the "Baobab" https://wiki.gnome.org/Apps/Baobab GUI Tool - to determine what is causing the fill-up (perhaps there is a defect driver spamming the logs?!?)


My Huawei E173 dongle works in Ubuntu 12.04 not in 13.10 As the topic mentions, I have this problem. I use the normal "connect" option on the right hand top and I am able to successfully connect to the network using 12.04 but not using 13.10.

May I know why and if there is a solution?

Follow these simple steps.

From here: Hoovam:Ubuntu 13.10 Not detecting dongles

Step 1 :
First thing first, plug in your dongle :)

Step 2 :
Click the network indicator in your menu bar.
You will  see that Ubuntu 13.10 is not showing the 'Enable Mobile Broadband' option in the network indicator.

Step 3 :
Open the 'Disks' application.

Step 4 :
You will see some 'Disk Drivers' listed under 'Devices' list.
Eject the 'CD Drive (dongle specific)'.

'CD Drive HUAWEI Mass Storage' in my case.

Step 5 :
Within 1 minute, you will see the option 'Enable Mobile Broadband' in your network indicator. Go ahead and connect. Done.

Hope it will solve your problem.


Is it possible to make Unity Indicators with Java? I just started to learn Java and I wonder if there is any way to make an indicator through it. I was looking for it here

But I can only find documentation there for C and Python… So is it only possible with those languages?

The Java language is meant to be cross-platform. It should not contain any features that cannot be implemented in all operating systems. However, there is a way to get around the system.

Java provides a built-in way to invoke functions that are written in a different language. This is the JNI (Java Native Interface). JNI allows you to call C code dynamically from your Java, and get the results of that code. You could implement the Unity Indicators in C, and dynamically call the code required to generate them from Java. Here is a good tutorial on using JNI: JNI Intro There are also libraries that abstract the use of JNI to really simple terms. JNA is one of them.


how to change file extensions in a directory I have many files in a directory having extension.

.text(2)
.text(1)

I want to remove the numbers from extension and output should be like

.text
.text

Can anyone please help me with the shell script for that?i am using CentOs 6.3.

Start the one-liner in the folder where the files are saved or change the path for the find command. In the following examples find . the path is . (dot).

Test with:

find . -type f -print0 | xargs -I{} -0 rename -v -n  's/\([0-9]+\)$//' {}

Rename with:

find . -type f -print0 | xargs -I{} -0 rename -v  's/\([0-9]+\)$//' {}

The command finds all files recursively and removes all occurrences of (<any_number>) at the end of the file name.

Remove the $ in 's/\([0-9]+\)$//' to remove all occurrences somewhere in the file name, eg:

find . -type f -print0 | xargs -I{} -0 rename -v  's/\([0-9]+\)//' {}

Example:

% ls -oga
-rw-rw-r--  1 0 Jun 10 09:34 .foo(1)
-rw-rw-r--  1  0 Jun 10 09:34 .bar(2)
% find . -type f -print0 | xargs -I{} -0 rename -v  's/\([0-9]+\)$//' {}
% ls -aog
-rw-rw-r--  1    0 Jun 10 09:34 .foo
-rw-rw-r--  1    0 Jun 10 09:34 .bar

This is "additional comment" and not a complete answer by itself.

This is a really long way of 'explaining' a minor concept - it will appear long and pedantic except if the reader has missed the point.

Short summary:

If there are more than one file of name like foo.txt[(n)]

foo.txt, foo.txt(1) -- rename -- > no change
Appears that nothing happened. It did.
foo.txt(1), foo.txt(2) -- rename --> foo.txt, foo.txt(2) (probably)
One file renamed, one not.

Longer:

You say that you do not have duplicate files.
You may be correct
BUT - the following is trivially obvious if you know it but a subtle trap if you have not met it before.

As far as the system is concerned

foo.txt = = foo.txt(1) = = foo.txt(2) = etc

regardless of file content or size.

ie If you have two files names foo.txt with or without (n) after them then the system thinks they are duplicates and/or they are duplicates.
Either way, a rename process will fail.

If the rename process would create two files with the same name then it will fail when the attempt is made to create the 1st-duplicate. But

In one case the failure will not create any output so it will appear that "nothing happened" when really "copying failed due to name collision" happened.
This case occurs when one file has no (n) suffix and one other has.
eg if existing files are foo.txt and foo.txt(1) then the rename of foo.txt(1) would create a duplicate if allowed so will not occur, and  so no action will take place.
foo.txt, foo.txt(1) -> no change

But if existing files are eg foo.txt(1) and foo.txt(2) then the rename of foo.txt(1) would NOT create a duplicate so will occur BUT the rename of foo.txt(2) subsequently would create a duplicate if allowed so no second-file-rename action will take place.
foo.txt(1), foo.txt(2) -> foo.txt, foo.txt(2) (probably)


How can I restart a specificed interface instead of restart all interface? I have a server which OS is Ubuntu 18.04.03 configured four IP addresses on four different interfaces. Now there is a interface I need to restart, and I can not interfere with other three interfaces. So I think I can't using sudo netplan apply. Is there any way to restart specificed interface?
Thankyou in advance!

Running sudo netplan apply should not cause interfaces to be brought down, if there are no changes to the configuration for those interfaces.  So this should be safe to run.  If you find that this command restarts interfaces whose configuration has not changed, that's a bug and should be reported at https://bugs.launchpad.net/netplan.

You can down and up the connection for particular interface with root permissions.
ifdown <interface_name>
ifup <interface_name>

Then reboot the system.


Dual boot after ubuntu install not working - NO EFI and different hard drive Edit: I'm trying to install Ubuntu 16.04 in a different hard drive than Windows, but grub is not loading after install.

I found a lot of topics relating windows 10 in EFI mode and Ubuntu, but my windows 10 is installed in legacy mode. Checking windows 10 disk management I don't have an EFI partition, so that confirms that I'm in legacy mode (double checked in BIOS and in Windows info).

I followed this guide on tecmint to install Ubuntu.

I adapted the tutorial to install Ubuntu in a different hard drive. I installed Ubuntu in /dev/sdb2 and 3 (the partitions that I created: root and home) and grub was installed in /dev/sdb.

Windows 10 is installed in /dev/sda1, and windows boot loader is installed in /dev/sda.

After Ubuntu is finished and I reboot, grub is never loaded. I even tried changing boot order BIOS order to first look into Ubuntu HDD, but nothing happens and windows is loaded.

Any clues on what might be happening?

Edit2: I'm running a desktop with an asrock mobo, 1 ssd and 1 hdd. Windows is installed in a M.2 ssd and Ubuntu is installed in the hdd

BIOS boots from the first HDD it finds with a bootloader in the MBR or flagged boot partition.
Since you have windows installed on sda, BIOS will boot from sda.
Thus, grub needs to be installed on sda.
I does not matter where ubuntu is installed. Grub will find it and make the appropriate entry.
Another option is to swap the drive cables, so ubuntu is sda and windows is sdb.


wget does not download all the files, and links aren't converted I tried

  wget -pk http://www.bbc.com/news/

to download this news site and store a local copy.

-p is used to save all the files in order to view the website locally. -k converts the links so that they should point to the local file.

But when I open the local html file of that website, and I do a right click on the displayed images... the image file on www.bbc.com is opened.

How can I solve this?

the coorect command is wget -r -k -np http://bbc.com/news

r   for recursive
k   for convert link after download
np  for no parent

You need to add few options to -p, use this command :

wget -E -H -k -K -p http://bbc.com/news


Ubuntu 12.10 Slow Download Speed I'm using ubuntu 12.10. Although system is quite fast, I have a very slow download speed.
Can anyone help me to fix it?

Thanks!

Do you have a reference speed to go by?  It may not be related to Ubuntu at all.  If you have another operating system or another computer to compare against you might be able to narrow down if its Ubuntu or your router/modem.

Try using IDM (Internet Download Manager).

If download speed is still slow, it could indicate a problem with your network configuration OR a problem with your internet connection.
If IDM is not compatible with Ubuntu, try downloading and installing "Wine" (to run Windows apps) and try again.


Bash - create zip by finding files I want to create bash script that find *.mp4 and zip it.

I use this:

#!/bin/sh
zip -r $(find . -name '*.mp4').zip $(find "/home/ehsan/Desktop" -name '*.pdf')

but not work and get this error:

zip error: Zip file structure invalid (./Bank_Mellat_v3.2_hassas-computer.com/Help.pdf)

Zipping all files in one archive

You can zip all files with a basename matching *.mp4 found under the current directory into a single archive with the following command:

zip my_mp4_archive.zip $(find . -name "*.mp4")

Zipping each file in an archive of its own

The following script will zip each file individually, in the same directory as the file itself is stored.

files=$(find . -name "*.mp4")

for f in $files; do
  echo "Compressing $f"
  (cd $(dirname $f) && zip $(basename $f.zip) $(basename $f))
done

Use this to compress all .mp4 files in the base directory and it's sub directories.

$ zip test.zip `find . -name \*.mp4 -print | tr "\n" " "`

Explanation:

To compress file zip file-name.zip path1 path2...

To get all file paths having .mp4 extension in base directory and all it's subdirectory use find:

find . -name \*.mp4 -print

To list all the output in one line separated by space like we require in our zip command pipe through tr "\n" " "

Putting everything together:

$ zip test.zip `find . -name \*.mp4 -print | tr "\n" " "`

Update
After reading OP's comment:

Simply iterate through all the found .mp4 file's pathnames
eg:

for p in `find . -name \*.mp4 -print`
do
    zip $p.zip $p
done

If your filename contains a space character, you case us tr to replace space with backslash space

Eg: Use $p | tr ' ' "\' '" instead of $p.


Crackling and delayed sound after upgrading to 18.04 I just upgraded to 18.04, and I noticed that the sound from my headphones, whether plugged into front or back port, was very crackling and slow/delayed. This issue didn't exist on 17.04/10. It also doesn't affect audio coming from HDMI via Radeon 560 GPU, just the headphone/onboard audio. The relevant device is:

00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)

I tried a bunch of fixes for pulseaudio I found googling, including this one and this one. Neither of which helped.

I have found something that at least makes it listenable - changing "default-fragment-size-msec" from 25 to 5 in /etc/pulse/daemon.conf. It makes it much much better, but still a little crackly from time to time.

I've googled for 30 min or more now, and not finding anything else that seems recent and relevant, so wondering if I should maybe open a bug, or if there's something I'm overlooking here.

I had the same issue and killing pulseaudio fixed it for me. I'm not sure why it would get into a bad state, but restarting pulseaudio might be something to try.

Try

killall pulseaudio

If you have Firefox or Chrome open when the sound starts distorting. Shut them browsers down and test the sound again. If it has stopped, then you need to use a different web browser. I installed Vivaldi yesterday and I haven't had a problem since. There are many browsers to choose from.


How to manage users and groups using GUI? Just switched from 10.04 to 11.10. I'm wondering about the limited options in the GUI for managing users and groups. Where is the old GUI to change groups, id's, etc. I know that I can do this from cli, that's no problem. But I want this comfortable GUI back.

Gnome System Tools for 11.10 & later Ubuntu versions

The old Users and Groups GUI is available by installing from Software Center the gnome-system-tools package

or from a terminal:

sudo apt-get install gnome-system-tools

Search in Dash:

Click and it will run the Users and Groups applet:

You can add both standard and administrator users using the settings->user accounts pane. You can set the password after the account has been added.

If you need more fine-grained control over which groups an account is in you will need to use the usermod program.


How do I connect to a server with thunar in Xubuntu? In Ubuntu running Gnome 2 you were able to select "Connect to Server" from the Places menu and you would get a graphical connection to whatever server you connected to.

Example:

How can you do this from within Xubuntu?

I was able to connect to servers by first running

sudo apt-get install gvfs-fuse gvfs-backends

Then, open up any folder and hit Ctrl+L.  In the location dialog box it presented I could then enter:

sftp://user@hostname:port/directory/path

This would give me a browser of the remote system.

Just an addition:
while ifconfig provides you with the current ip address it needs root/sudo
ip addr would work without this need and returns an address too


How to get the GNOME 3 login manager installed? I was wondering if it is possible to get the GNOME 3.2 GDM login theme working on Ubuntu 11.10. I installed GDM alongside LightDM, but the GDM greeter is really ugly.

Tista and three other dev's have done just this (see link below).

Tista has created a testing PPA to install GDM 3.2 - this is the version of the login manager which you can theme via CSS.

Warning - this is a testing PPA

At the time of writing this, there are only packages for Precise (12.04)

I originally tested this on a 11.10 virtual machine when a package existed - hence the screenshot:

I've since retested this on 12.04 - Important - see the notes below

sudo add-apt-repository ppa:tista/gdm-testing
sudo apt-get update
sudo apt-get install gdm  libgdmgreeter1 libgdmsimplegreeter1 gir1.2-gdmgreeter-1.0

source

During the installation of GDM you will be asked which display-manager you want to run.  Choose GDM and press ENTER

Reboot

changing the background

To change the background, use the AU linked question below to change the background.

The Gnome-shell stripes background can be found on GitHub.

Issues

Whilst there is a package for Precise (12.04), I personally haven't managed to get this to work correctly (left me at a blank screen with no login manager).  Thus - it may or may not work for you - obviously it must work for the PPA developer!  If you are left with a blank screen, use CTRL+ALT+F2 to log into a TTY and use this Q&A to switch back to lightDM
Since this is GDM - it does not appear to work with Unity.  It does work with Gnome-Shell. For Unity, a blank background is seen.  You have to use CTRL+ALT+T to launch a terminal and then type unity --reset to get the unity desktop to display.  I'm open to suggestions why this happens and if there is a workaround...
If you logout and attempt to login again - Gnome-Shell very occasionally not start and you will be left with an empty desktop.

Links:

Discussion of implementation of GDM 3.2
How to set gtk-style and background in GDM3

You should try this link GDM Theme.  It is not for 11.10 but this could give you an idea.


uninstalling/reinstalling wifi Drivers in ubuntu Hi so the internet seems to be working fine on every device except my laptop. Sometimes it would even stop showing the available networks. I recently switched to ubuntu and this used to happen on windows too but a simple reinstallation of wifi driver or renabling the wifi driver after disabling it would solve the issue.
Possible solutions I am looking for:
1. Is there a device manager utility in ubuntu like in windows where I can disable/enable drivers or reinstall them?
If not then
2. How to disable wifi drivers in ubuntu?
3. How to reinstall/uninstall wifi drivers?
Edited to add the output of lspci -knn | grep Net -A3
    Subsystem: Dell QCA9377 802.11ac Wireless Network Adapter [1028:1810]
    Kernel driver in use: ath10k_pci
    Kernel modules: ath10k_pci
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)

Using ubuntu 20.04.1

This wireless device "QCA9377 802.11ac Wireless Network Adapte" is supported by Linux kernel and does not require any drivers.
Problems with your wireless device may be caused by a kernel bug, a hardware problem, or other reasons.
If this happened on Windows too, it means that most likely it is a hardware issue.
You can reload the in-try driver by running:
sudo modprobe -r ath10k_pci
sudo modprobe ath10k_pci

terminal:
rfkill list
Example:
rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
Turn OFF WiFi
rfkill block wifi OR using “rfkill list” index rfkill block 0
Turn ON WiFi
rfkill unblock wifi OR using “rfkill list” index rfkill unblock 0

How can I bring back disappeared or hard-blocked wifi on linux?


Updating Chromium requires installation of untrusted packages I can't update my Ubuntu cause it says:

  Requires installation of untrusted packages

  The action would require the installation of packages from not
  authenticated sources.

  chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg

Why is that? I never changed anything and it always used to work fine.

If you haven't installed any PPA's for Chromium, press the Reload button in the package manager (the command line equivalent is sudo apt-get update). If the problem persists, wait a day before retrying. The mirror is possibly not completely updated yet or a proxy is caching the contents.

Try:

sudo add-apt-repository ppa:chromium-daily/ppa

That should authenticate your chromium packages and let you download the updates, etc.


How to install Windows(8.1/10) when Ubuntu 14.04 is installed? I want to install windows operating system on my laptop (originally came with windows, but deleted it because Ubuntu is better for me, but now I have to use Windows, because of my studies).

Few days ago I tried to install Windows 10 using USB stick, but couldn't because Ubuntu didn't boot it.

And that's where my question comes. I want to install Windows and delete Ubuntu just as it was before I installed Ubuntu. Of course, I tried to google this kind of problem, but didn't succeed. I'm not sure, but I guess I need to change the format of my disk, which is ext4. Here is the screen of GParted.

Please feel free to share your knowledge!:)

P.S. If some kind of extra information is needed please say so.

Thank you, best regards.

Few days ago I tried to install Windows 10 using USB stick, but couldn't because Ubuntu didn't boot it.

So, that's a misconception here. Ubuntu won't boot from your USB stick. That has to happen before you boot Ubuntu or any other operating system.

First off, not all computers can boot from USB, they need to be sufficiently new to support this (the last couple of years should be fine).

Plug-in your USB stick and reboot your PC. What happens next depends on your PC (and the BIOS/UEFI).

Usually you will see a message like "Press some key to change boot device". So, often you'll see a message and it'll tell you what key to press to select a boot device. Sometimes you will only see a message about "BIOS setup" or similar and you will have to change the boot priority there.

What do I mean by boot priority? That's the priority of devices your BIOS/UEFI will check for operating systems (or boot loaders). On modern systems, the hard disk will often be the first. Since that's where your groub boot loader is, it won't continue searching.

If you tell us your PC model/manufacturer, we/I/you could search for the exact message.

EDIT:
I found a list of keys for different vendors/models. F12 is very common

Você já deu a resposta desde o início. Faz o seguinte cria outra partição no Linux de 300 GB do tipo NTFS - FAT32 e então tenta novamente instalar o Windows, acredito que não terá problema nenhum.


How to troubleshoot 17.04 failure to boot after new installation with UEFI I created a 17.04 installer on a  GPT formatted USB with Startup Disk Creator and used it to create a new 17.04 installation on a GPT formatted SSD.The intent was that the new SSD should boot iin UEFI mode without Secure Boot.

When I boot from this SSD I simply get a blank screen with no indication that Grub2 has loaded or done anything. The system is not completely locked because I can reboot with Ctrl-Alt-Delete.

I have verified that there are no apparent hardware problems and both the installation USB and the new SSD pass a e2fsck check.

The new SSD has an ESP of 400Mb and the contents appear to be sensible.

How should I troubleshoot this situation? I want to both solve this specific problem and improve my troubleshooting skills with the latter being the priority.

Thanks to the comments of @Rod which pointed me in the right direction, I was able to solve this problem. What happened was that my machine is 5+ years old and has an early copy of UEFI which seems to ignore the EFI boot order. Instead it insists that the ESP must be on /dev/sda1 and on my machine it was on /dev/sda3 as a result of numerous changes to disk configurations.

I needed to delete all the partitions on the disk, then delete the GPT partition itself. Once this was complete I then created a new set of partitions with the ESP as the first partition, landing on /dev/sda1. Finally I reinstalled Ubuntu 17.04, rebooted and everything worked.

three specific difficulties come to mind immediately.

first: efi firmware stored information. If you have a ubuntu live image, start it and install efibootmgr. use it to remove all entries in the efi.

second: not all uefi implementations, scan for OS. They look for /efi/boot/bootx64.efi on the first fat32 partition. copy grubx64.efi to this folder and rename it.

Third: some efi implementions, require a 1 GB ntfs recovery or diagnostics partition to be the first thing on the disk with the efi partition being second.

Fourth: verify that you booted and installed uefi. some systems will boot CMS when secure boot is turned off


How to connect and disconnect to a network manually in terminal? Since the network manager is troubling me so much I want to replace it (possibly wicd orNM from ppa:volanin).

I do not know how to connect and disconnect to the network through the terminal without using network manager.

I would like a command-line way of managing the network.

This applies to 12.04+ since these are the ones I could test but could also be used in older versions. I have separated this guide into several parts, which consist of:

Part 1 Wireless Routers with no password or WEP Key
Part 2 Wireless Routers with WPA or WPA2 security Key

Part 2.1 Connecting to a WPA Router with wpa_supplicant
Part 2.2 Connecting to a WPA Router with Network Manager

Part 3 Easy Connection Via nmcli
Part 4 Disconnecting from a Wireless Router
Part 5 Deleting a Connection (Including Configuration File)
Part 6 Automatic connection when login in
Bonus How to find your network interface name via GUI

The following command lines can be used to connect and disconnect depending on the Wireless card, wireless security and wireless router settings. Before proceeding, make sure the network service is enabled (For cases where you might start Ubuntu using Recovery mode):

Depending on your Ubuntu Version, you would need to start it using one of the following way:

If using SystemD (since 14.10+):

sudo systemctl start networking

If using the Legacy init.d way: sudo /etc/init.d/networking restart

If using the Legacy Upstart way: sudo service network-manager restart

Part 1: Wireless Routers with no password or WEP Key

For cases where the wireless router has no password or WEP security, do the following:

Open the terminal and lookup for the wireless connection:

iwlist wlan0 s

(The s is for Scan. wlan0 is my wireless card but could be different for each user. Some have eth0, others wlan2.. You need sudo to execute this option.To find out the name of your wireless card simply type iwlist and press TAB. This should autocomplete the line with the network card's name. You can also type iwconfig and find the name on the list that will show.)

If you do not know the name of your wireless devices type: iwconfig which will show you your wired/wireless devices and their names. They might be something like wlan0, wlan1, eth1, eth2..
The lookup will show you all possible Access Points (AP) visible to you. After you see your router in the list try to connect to it:

If it does not have a password do the following:

iwconfig wlan0 essid NAME_OF_ACCESS_POINT

For example

iwconfig wlan0 essid CYREX

after that, make sure to use dhclient so you can get a dynamic IP in case you don't get assigned one by the router. That should leave you connected to the CYREX router.

If it has a password then do:

iwconfig wlan0 essid CYREX key PASSWORD

That should connect using the PASSWORD you gave there.

Again, do dhclient after connecting to make sure you get an IP assigned.
Making sure you are correctly connected is always good so execute iwconfig to make sure your wireless card is connected to the SSID you mentioned above. It should show your device connected and the IP assigned to you. If it does not and gives you an error like Interface doesn't support scanning try the following 2 options:

Test if your interface is UP: sudo ifconfig wlan0 up
Try adding sudo when doing the scan: sudo iwlist wlan0 s
Try bringing the device down and then back up:

sudo ifconfig wlan0 down
sudo ifconfig wlan0 up

Part 2: Wireless Routers with WPA or WPA2 security Key

For cases where the wireless router has a WPA/WPA2 password there are a few ways of doing this. I will mention the 2 most popular ones::

Open the terminal and lookup for the wireless connection:

iwlist wlan0 s

(The s is for Scan. wlan0 is my wireless card but could be different for each user. Some have eth0, others wlan2.. You need sudo to execute this option. To find out the name of your wireless card simply type iwlist and press TAB. This should autocomplete the line with the network card's name. You can also type iwconfig and find the name on the list that will show.)

If you do not know the name of your wireless devices type: iwconfig which will show you your wired/wireless devices and their names. They might be something like wlan0, wlan1, eth1, eth2..
The lookup will show you all possible Access Points (AP) visible to you. After you see your router in the list try to connect to it:

Part 2.1 WPA-SUPPLICANT GUIDE: Connecting to a WPA Router with wpa_supplicant

Type the following in the terminal (Assuming you have the wpasupplicant package installed which installs all the needed commands we will use here):

wpa_passphrase SSID PASSWORD > CONFIG_FILE

Example: wpa_passphrase Virus LinuxFTW > wpa.conf

Where Virus is the name of my router,LinuxFTW is my password and wpa.conf is the file where I want to store all of this information in. Note that you can save the file in another place, many users save the file in /etc/wpa_supplicant.conf instead of wpa.conf. The data of the wpa.conf file should be something like this:

network={
        ssid="Virus"
        #psk="LinuxFTW"
        psk=1d538d505f48205589ad25b2ca9f52f9cbb67687e310c58a8dd940ccc03fbfae
}

Up to this point, we should know the name of our wireless card interface (eg: Wlan0, eth2, Wlan2...). We now need to know which Driver is in use. for this we type:

wpa_supplicant

It should show us a lot of information, but there will be a section called **Drivers* which shows all available drivers (These are available when compiling wpa_supplicant). In my case it is like this:

drivers:
  wext = Linux wireless extensions (generic)
  nl80211 = Linux nl80211/cfg80211
  wired = Wired Ethernet driver
  none = no driver (RADIUS server/WPS ER)

The whole list is hostap, hermes, madwifi, wext, broadcom, wired, roboswitch, bsd, ndis. This can change depending on how wpa_supplicant was compiled, but the one that shows for me should be similar to the one on your system. Most users will select the wext driver.
So now that we have our wireless interface card name and the driver name, we proceed to connect to it using the already created configuration file using the following format:

wpa_supplicant -iINTERFACE_NAME -cCONFIGURATION_FILE -DDRIVER_NAME

For example:

wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dwext

Where -i is your interface card's name, -c is where your configuration file is and -D is the name of the driver you will be using to connect. If it connects correctly, then we press CTRL+C to cancel it and then execute the line again but this time we send it to the background with -B so we can continue to use the terminal:

wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext

After that simply do a sudo dhclient wlan0 to get an IP from the router.
Some users have reported removing the Hash and leaving only the password in the config, for example:

     network={
            ssid="Virus"
            psk="LinuxFTW"
    }

Others have added the ssid_scan to the config file:

    network={
            ssid="Virus"
            scan_ssid=1
            #psk="LinuxFTW"
            psk=1d538d505f48205589ad25b2ca9f52f9cbb67687e310c58a8dd940ccc03fbfae
    }

Or even adding the Key type:

    network={
            ssid="Virus"
            scan_ssid=1
            key_mgmt=WPA-PSK
            #psk="LinuxFTW"
            psk=1d538d505f48205589ad25b2ca9f52f9cbb67687e310c58a8dd940ccc03fbfae
    }

More information about this in man wpa_supplicant.conf

Part 2.2 NETWORK MANAGER GUIDE: Connecting to a WPA Router with Network Manager

The good thing about network manager is that it comes with a couple of nice scripts and tools. Two of these are nmcli and create_connection (Neat Python 3 script) which we will use in this case.

After doing the steps mentioned previously to find your router's SSID name (Remember the part about iwlist above) we do the following:

sudo /usr/share/checkbox/scripts/create_connection -S SECURITY_TYPE -K PASSWORD SSID_NAME

Where SECURITY is the type of security the Router uses (WPA, WEP), PASSWORD is.. well..the password and SSID_NAME is the SSID Name of the Router. For example:

sudo /usr/share/checkbox/scripts/create_connection -S wpa -K LinuxFTW Virus

Will create a connection for Network Manager which should look something like this:

  $ sudo /usr/share/checkbox/scripts/create_connection -S wpa -K LinuxFTW Virus
  [sudo] password for cyrex:
  Connection Virus registered
  Connection Virus activated.

After this, you should get an IP assigned from the router. If not simply do sudo dhclient wlan0 (Assuming wlan0 is the name of your interface). You can also check your network manager's connections using nmcli like this: nmcli c which should show something like this:

 $ nmcli c
  NAME                      UUID                                   TYPE              TIMESTAMP-REAL
  Xcentral                  f51a5a64-8a91-47d6-897c-28efcd84d2b0   802-11-wireless   Fri 22 Mar 2013 02:25:54 PM VET
  Realtek                   9ded7740-ad29-4c8f-861f-84ec4da87f8d   802-3-ethernet    Tue 05 Mar 2013 01:18:31 AM VET
  Intel                     e25b1fd8-c4ff-41ac-a6bc-22620296f01c   802-3-ethernet    Fri 05 Apr 2013 10:04:05 PM VET
  Virus                     3f8ced55-507b-4558-a70b-0d260441f570   802-11-wireless   Tue 09 Apr 2013 06:31:10 AM VET

I mention the Network Manager's way because there are a couple of cases where using  wpa_supplicant will simply not work (Problems between router and wireless card, security issues, etc..). In my case, all attempts to use wpa_supplicant on one PC did not work, but in another it worked the first time I tried. So am posting both methods to help on each case and to make it easier for users to decide which one they want.

Part 3: Easy Connection via nmcli

Although we have talked about the ways to connect to it without a network manager, there is also the case of using nmcli (CLI version of the network manager) when it applies. To do this, we do the following:

Check to see which ESSID we can see:

nmcli dev wifi

Verify the name of the ESSID and we proceed on using it on the next line including the password needed for it (This includes WEP and WPA type passwords):

nmcli dev wifi connect ESSID_NAME password ESSID_PASSWORD

Here is an example of me connecting to the ESSID Linux5G

If you have multiple wireless devices on your computer, you can specify which one to use using the ifname parameter like so:

nmcli dev wifi connect ESSID_NAME password ESSID_PASSWORD ifname WIRELESS_DEVICE_NAME

For example in my case the name of the device is wlp9s0 so I would use this line to specify the device that I will use to connect with:

More information about nmcli can be obtained by using the help parameter. For example if you wanted to know about about nmcli dev you would type nmcli dev help. If you wanted to know more about nmcli dev wifi, you would type nmcli dev wifi help and so on.

Part 4: Disconnecting from a Wireless Router

There are several ways of accomplishing this:

Disconnect by "force": sudo ifconfig wlan0 down

This will turn your wireless card interface off (Driver turns off). To turn in on simply type ifconfig wlan0 up followed by a sudo dhclient wlan0. It will still show as connected if viewed by Network Manager but there will actually be no connection to the router. Trying to ping will throw an connect: Network is unreachable error.
Release the DHCP IP: sudo dhclient -r wlan0

Remember to do sudo dhclient wlan0 to assign yourself an IP again.
Disconnect using Network Manager: nmcli nm enable false

Where nm is the parameter of nmcli that manages and sets Network Manager's states. The option enable can be true or false, meaning if set to false, all network connections managed by Network Manager will be disconnected. note that nmcli does not need root permissions.

To see the status of Network Manager type nmcli nm, it should show something similar to this:

      $ nmcli nm
      RUNNING         STATE           WIFI-HARDWARE   WIFI       WWAN-HARDWARE   WWAN
      running         connected       enabled         enabled    enabled         enabled

Another way of turning the Connection On or Off (Connecting/Disconnecting) is by doing the following:

nmcli c down id NAME` - Will disconnect the connection NAME

nmcli c up id NAME` - Will connect the connection NAME

Part 5: Deleting a Connection

To delete an existing connection is fairly easy. First type in the terminal:

nmcli c

It will output something like this:

$ nmcli c
NAME                      UUID                                   TYPE              TIMESTAMP-REAL
Realtek                   9ded7740-ad29-4c8f-861f-84ec4da87f8d   802-3-ethernet    Tue 05 Mar 2013 01:18:31 AM VET
PrivateSys                86b2b37d-4835-44f1-ba95-46c4b747140f   802-11-wireless   Sun 21 Apr 2013 07:52:57 PM VET
pepe                      9887664b-183a-45c0-a81f-27d5d0e6d9d8   802-11-wireless   Thu 18 Apr 2013 02:43:05 AM VET
Virus                     3f8ced55-507b-4558-a70b-0d260441f570   802-11-wireless   Tue 16 Apr 2013 11:33:24 AM VET
Intel                     e25b1fd8-c4ff-41ac-a6bc-22620296f01c   802-3-ethernet    Sun 21 Apr 2013 08:12:29 PM VET
Xcentral                  f51a5a64-8a91-47d6-897c-28efcd84d2b0   802-11-wireless   Fri 22 Mar 2013 02:25:54 PM VET

Now let us say we want to delete Xcentral, we then proceed with the following command:

nmcli c delete id Xcentral

After doing it should look something like this:

$ nmcli c delete id Xcentral
$ nmcli c
NAME                      UUID                                   TYPE              TIMESTAMP-REAL
Realtek                   9ded7740-ad29-4c8f-861f-84ec4da87f8d   802-3-ethernet    Tue 05 Mar 2013 01:18:31 AM VET
PrivateSys                86b2b37d-4835-44f1-ba95-46c4b747140f   802-11-wireless   Sun 21 Apr 2013 07:52:57 PM VET
pepe                      9887664b-183a-45c0-a81f-27d5d0e6d9d8   802-11-wireless   Thu 18 Apr 2013 02:43:05 AM VET
Virus                     3f8ced55-507b-4558-a70b-0d260441f570   802-11-wireless   Tue 16 Apr 2013 11:33:24 AM VET
Intel                     e25b1fd8-c4ff-41ac-a6bc-22620296f01c   802-3-ethernet    Sun 21 Apr 2013 08:12:29 PM VET

All connections are stored in /etc/NetworkManager/system-connections/

If I were to look in that folder right now I would see the following files:

$ ls /etc/NetworkManager/system-connections
Intel  pepe  PrivateSys  Realtek  Virus

This is only in case you wish to edit/delete/add a connection by hand.

Part 6: Automatic connection when login in

For cases where you would like to login automatically to a wireless router here are the steps:

Open the interface file:

sudo nano /etc/network/interfaces

Add the following information (Assuming your interface is called wlan0):

auto wlan0
iface wlan0 inet static
address ASSIGNED_IP
netmask 255.255.255.0
gateway THE_GATEWAY
wireless-essid YOURSSID
wireless-key WIRELESSKEY_HERE

Save the file and reboot computer. Note that this will be saved on a plain text file which can be accessed from the same computer.

Bonus: Find your wireless connection's name GUI Style

Click on the Network Manager and go to Connection Information

Go to the Tab that holds your wireless card

In this image, this network card is named eth1 (Inside the parenthesis) but this can be different for each user. Normally it would be a wlan (Like wlan0, wlan1, wlan2...) but it can also be eth1, eth2, etc.. So you need to see what name it has.

Another way to find the name quickly is by typing iwconfig which will show all the wireless network card available.

I use wicd-curses, which I find to be the easiest user interface by far.

You need to use the → (right arrow key ->) to set configurations; everything else is obvious from the on-screen instructions.

Of course you need to find some way of getting on the internet without wicd; I'm assuming you have already solved that or else you wouldn't be posting.

(This is not timely to the OP, just posting for posterity since this question still comes up on Google. To the google-seekers: if you're reading this from a café or friend's computer or something, maybe you can use a wire somewhere to get wicd-curses installed with sudo apt-get install wicd-curses; then make sure you test it out on a network that's known to work before leaving!)


Ubuntu 16.10 upgrade Unity8 fails to login I upgraded 16.04 to 16.10 and wanted to try unity8.  In the login screen when i select "unity8" and enter password the screen stay as is and nothing happens
*screenshot attached

**What should i do? Where can i get the logs that are being using to investigate whats going on

From what I've read so far the reason behind that is in missing support of features used in Unity by Nvidia drivers.I could try to switch to intel driver just for the sake of the test, but decided it's not worth the effort.

So far it's unclear when NVidia will properly support U8, at least I didn't find any specific date

I would recommend just purging the hideous nightmare that comprises Unity 8 entirely using
sudo autoremove --purge unity8
which will uninstall all the main unnecessary components of the Unity 8 preview. I'm running 16.10 perfectly fine without it.


Gimp: Export every layer as a separate PNG image I have come to a situation where I have an image in Gimp with multiple layers. Now, I want to export every single layer as an individual image (PNG format preferably) automatically to a folder somewhere.

Is this possible?

The long method: Hide all layers except one, crop the section you want, export image. Hide saved layer, unhide another one, crop section, export. Repeat. Kinda cumbersome for an image with about 20 layers.

If PNG is an acceptable output format, one option is to export it as Open Raster (.ora), an open specification for layered-image files.

Export Image as Open Raster (.ora)

File -> Export As ...

myfile.ora
Open myfile.ora as an archive, with a program like file-roller or 7zip.

On Ubuntu:

$ file-roller myfile.ora

$ # note, later version of file-roller on ubuntu hard-code file suffixes,
  # and refuse to open ".ora" files, work around by renaming the file to ".zip"
$ ln -s myfile.ora myfile.ora.zip
$ file-roller myfile.ora.zip

alternatively

$ unzip myfile.ora

All your layers will be png images under /data, Extract them and use at will.

As an alternative approach to my previous script-based suggestion, I have finally discovered that you can also do this with one of the tools available if you have the GIMP GAP installed. (That's the Gimp Animation... Package? Plugin? Something like that.)
It's a bit hidden in the forest of GAP menu options, but the "Video" menu selection "Split Image to Frames..." will do so by saving each layer as an individual file. In whatever format you specify (via the file extension), and with several options for how to handle the layers. Here's the dialog that came up when I chose that option after saving an un-optimized animated GIF as a 52-layer /tmp/testfile.xcf:

Despite the filename preview, the frames were saved as /tmp/testfile_01.png through /tmp/testfile_52.png, as specified. (It doesn't update the displayed string in response to your selections, but it does honor them.)


proper way to install skype x86-64 in ubuntu 12.04 after recent skype upgrade i'm having problens installing or upgrading skype in ubuntu 12.04 x86-64 after recent skype upgrade.

sudo apt-get install skype

it says skype depends on skype-bin and I'm having held packages. I purged skype abd skype-bin and all it's dependancies but still no go. Why does it happen on LTS which I use in my office??

Errors like absence of /usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so means that Skype needs libasound2-plugins:i386.

So my recipe that helps me is to run the following command:

apt-get install libasound2-plugins:i386

This worked for me. (the skype downloaded from the website it self directly gave me errors.
http://xchamitha.blogspot.co.uk/2013/07/install-skype-in-ubuntu-1304.html


In SSH, how do I mv to my local system? I ssh-ed into my webhost's directory, and tar-ed the webapp to download. When I try to mv to ~/mydirectory/backups or /home/mydirectory/backups, it defines the "home" as my root on the webhost that I'm ssh'ed into.

How do I mv in ssh to a local drive while still being inside the webhost's system?

First things first: ssh is a way to remotely login to another computer. The shell (command line) you get after you ssh is (pretty much) the same as if you had opened a xterm in the remote machine. If offers no such way to move files.

However, the fact that the remote computer accepts ssh connections gives you some options to exchange files:

Use scp
To copy from your local computer to the remote, type, in the local computer:

scp /tmp/file user@example.com:/home/name/dir

(where /tmp/file can be replaced with any local file and /home/name/dir with any remote directory)

To copy from the remote computer to the local one, type, in the local computer:

scp user@example.com:/home/name/dir/file /tmp

Use sshfs
This is a little more advanced but much, much nicer (when the internet connection of both computers is good. If not, stick to scp)

You can "link" a directory from the remote computer to an (empty) directory of the local computer. Say you "link" the /some/remote/dir from the remote computer to /home/youruser/remotecomp in your computer. If there is a file /some/remote/dir/file in the remote computer, you can see it on /home/youruser/remotecomp/file. You can copy and mv as usual, and you can even alter remote files and dirs.

Note however, that when the connection ends, /home/youruser/remotecomp becomes an empty dir again, and you only keep in the local computer the files you copied to other directories

To achieve this:

1) install sshfs:

sudo apt-get install sshfs

2) create a empty dir

mkdir /home/youruser/remotecomp

3) "link" the two directories (the right term is mount)

sshfs user@server.com:/some/remote/dir /home/youruser/remotecomp

4) Enjoy

5) "unlink" the dirs

fusermount -u /home/youruser/remotecomp

If the local computer runs windows
You can find versions of scp for windows. See, e.g, winscp

The other answers recommend rsync or scp, both of which require you to know the location of the file you want to copy on the remote machine.

If you instead want to be able to poke around on the remote machine, like you can with ssh, you want to run sftp.  Logging into the server is very similar to ssh, but once you get in, type help to get the list of commands - it lets you move yourself around on both the local and remote machines, and transfer files back and forth easily.


Cannot boot up computer I installed ubuntu and burned the iso file to the d drive. After I reboot my computer, the ubuntu install menu shows up. I choose the first option (the "try ubuntu" thing) and then this happen. http://cdn5.howtogeek.com/wp-content/uploads/2014/09/650x300xubuntu-boot-error.jpg.pagespeed.ic.VZB6J0B3_b.webp

My computer is in Windows 7, 32-bit. What else I can do?

1. Check that you have burned the correct image
Make sure the image that you downloaded was a x32 image.
2. Try reinstalling  the image
I've used Pen Drive  Linux in the past, but for live USBs. Maybe it will help with some issues, but do some research first. I'm not sure if it will work on hard drives since it is meant for USBs.

Better re-image  your system, all i can understand is that your system and OS is having compatibility issue.. So check one more time carefully and then install it should work


How to delete sub-folders but keep all the files? I'm wondering if there's a way on Ubuntu to delete all of the subfolders in a folder but keep all the files?

a combination of the two answers above might work.

step 1.

find oldLocation -type f -exec mv {} newLocation \;   #find and copy all files.

step 2.

rm -frv oldLocation

You might want to reword your questions, it's not very clear what the behavior you want is.

The question is impossible. You can't delete a directory without harming the files inside of it.


Fail to start mongod service but mongodb service Ubuntu: 14.04

MongodB version: 3.2.6

MongoDB shell version: 3.2.6 connecting to: test

2017-06-26T07:46:48.195+0000 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2017-06-26T07:46:48.196+0000 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6 exception: connect failed

Hi guys,

Our service contains both mongodb and mongod service.  We used to run mongod service (sudo service mongod start) however recently when re run mongod service, we got the error above.

However this problem didn't happen when we run mongodB service .

This is the mongod.conf file.  Wonder who can give me some advice?  Thanks!

storage:
  smallFiles: true
  dbPath: /var/lib/mongodb
  journal:
    enabled: true

systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log

net:
  port: 27017
  bindIp: [127.0.0.1,X.X.X.X]

replSet=spof
replication:
        replSetName: rs0

Try the following:

sudo rm /var/lib/mongodb/mongod.lock
sudo mongod --repair
sudo service mongod start
sudo service mongod status

Double check you've not got conflicting rules in iptables.

Double check /etc/mongod.conf and check bind_ip = 0.0.0.0 to allow external connections.

The format of bindIp is not correct.

If you want to have multiple IPs, you should do it like this:

net:
  port: 27017
  bindIp: 127.0.0.1,X.X.X.X


Installation of Windows7 in Virtualbox hangs at "Expanding Windows files" The Storage settings in VBox look like so:

Note that this is not about Windows OS, but about a program running in Ubuntu. In this sense Virtualbox is no less "ubuntish" than Firefox. This cannot be contradicted by Virtualbox being intended at running other OSes, including Windows, inside a virtual environment.

The solution that works is THIS.

Shut down the machine.
On the settings tab, go to storage and then under SATA Controller you’ll see your virtual hard drive (win7.vdi in the image above).
Right click on that and  'Remove attachment'.
Right click on 'Controller: IDE' and “Add Hard disk”, then locate you virtual hard drive you created earlier (as above win7.vdi).

It should look like so:

Start the machine. It will say that a previous installation exists which will be renamed. Carry on.

It may still freeze; but shutting down the machine and starting it will continue the installation (probably some restart procedure that does not work in the VM).

This also may work:  In the storage section, Add a SCSI controller.  In SCSI Port 0, attach (virtually by clicking) your windows 7 .vdi.  You can leave the SATA controller "installed" but attach nothing to it. The "sr0" host drive is a USB attached DVD drive in which I placed my Windows original install CD.  HTH

I tried to post a screen shot.


Can't write /etc/sudoers from Ubuntu live CD I messed up the /etc/sudoers file, now I need to restore it. Booted up the system with an Ubuntu Live CD, installed LVM and mounted the Volume. I'm root and I can't write to the sudoers file in my mounted hd.

I can't change the permission with chmod because system tell me it's a read-only file system.

What should I do?

Suppose you mounted your install Ubuntu system's root filesystem at /mnt on the transient live CD system, and that the partition is /dev/sda1.

Then remount it readwrite:

sudo mount -o rw,remount /dev/sda1 /mnt

If that fails, unmount the filesystem (with umount) and fsck it to find and repair any errors (see also e2fsck).

Then you can edit its sudoers file like this:

sudo visudo -f /mnt/etc/sudoers

Actually, you can edit it as root using whatever mechanism you want. For example, to edit it in such a way as to allow you to introduce errors that break it and prevent sudo from working:

sudo -e /mnt/etc/sudoers

But visudo is better because it won't save your changes to the file if they are syntactically wrong.

By using visudo when editing /etc/sudoers on your installed system (from the installed system), you avoid having to boot into recovery mode, or to a live CD, to fix it.

sudo visudo

If you do break your sudoers file, you can fix it without booting into recovery mode or rebooting, because there is another mechanism besides sudo for becoming root:

pkexec visudo

pkexec is the command-line frontend to PolicyKit. It is generally not present on server systems without a GUI, but it will be present on virtually any Ubuntu system with a GUI (and you do not actually need the GUI to be working to use it, though if there is a GUI it will give you an authentication window rather than authenticating in the terminal itself).

I figure out how to do it, recovery mode, exit from read only file, drop on the root sheel and now I have the write permission :D


ifconfig missing after Ubuntu 18.04 install I've just installed Ubuntu 18.04 and selected "minimal install". I then tried to run ifconfig in the terminal and got the following message

-bash: ifconfig: command not found

How come the net-tools package is not installed by default any more?

ifconfig is deprecated, and has been so for quite a number of years. The new kid in town is the ip command, which can configure IP's, routes, and everything associated with networks.

You can install ifconfig with sudo apt install net-tools, if you absolutely need to have it. If not, start learning ip.

In short, it is removed because you should not use it. It has mediocre IPv6 support, the ip command is a better replacement. I find sources saying ifconfig was deprecated back in 2012, so I'm not surprised it's finally removed.

You may be able to install it on 18.04, but on future releases it may disappear entirely. I would consider it not being installed by default as a warning shot: learn ip.

Thus ifconfig is probably in a special class. In previous versions of Ubuntu it was included in minimal installs. It is now being phased out, and you explicitly have to install it. This can not be taken to indicate that any other packages are missing.

This makes the copying of IP addies simpler:
alias ifconfig="ip -c a | sed -e 's/\// \//g'"

(otherwise that subnet slash prevents doubleclick->select of only the IP)


Telegram not to be found I have installed telegram many months ago and it was working fine. Today it wouldn't open from the launch or from startup and when I tried looking for it in the Ubuntu software centre it didn't seem to be among the insalled programs. I thought I needed to uninstall it first in order to try and reinstall it.
I'm using 14.04

What I did was: delete the old telegram folder from the download one then downloaded again from the telegram web site and now it works.

Maybe You just need to update repositoy and libraries.
Didyou try: sudo dpkg --configure-a // sudo apt-get install -f

Or:

sudo apt-get update && sudo apt-get upgrade && sudo apt-get update-manager -d -c && sudo apt-get check && sudo apt-get -f install && sudo dpkg -i --force-all %% sudo apt-get -f install && sudo apt-get dist-upgrade

This things above not bite. But you are in charge. If you think is no good Do not do it. I Did and still alive.


Recommended testing tools to test MySQL performance? What is the recommended tool(s) for testing the performance of MySQL 5.5 (innodb) under Ubuntu 12.04?

We have purchased a new multi-cpu multi-core server to replace our current MySQL dual-core server. However, the MySQL performance is worse than our current server! We know we need to tweak the innodb parameters but it would be helpful if there is a tool out there that would test and make recommendations.

Take a look at mysqltuner.pl  which can be found here

I agree with Jan, mysqltuner.pl is a fine tool for the first tuning steps of your MySQL server.

But MySQL is part of a whole IT system. Raw performance is one thing, but what about real-life performance? (I work as an engineer at Neotys, the software vendor of NeoLoad, a load testing tool since 2005.)

To complete your test, I advise you to take a look at NeoLoad (free 30-day evaluation on www.neotys.com) to validate the performance, robustness, and scalability of your server in the context of your application. You can record and generate load from the front-end of your IT system, and measure the performance of your MySQL server when your application is actually used.

For MySQL, here are the counters that NeoLoad monitors : http://www.neotys.com/product/monitoring-mysql-web-load-testing.html.
Also, NeoLoad provides threshold values—derived from industry best practices—to raise relevant alerts.

Regards,

Hervé Servy, Neotys Performance Engineer


Adding a network folder to Clementine library I have 2 machines running Ubuntu.  One of them contains a music library on its windows partition.

I can connect to that computer's music library via 'connect to server' and save that location as a bookmark, but I can't figure out a way to add that folder/bookmark to my Clementine library.

Any ideas?

Just found this post before but found easier solution for Ubuntu 12.10.

So to share for anyone else looking...

Ubuntu stores network shares as a folder in /run/user/<user-name>/gvfs/<share-name>

In Clementine just add that share folder.
Saves a lot of time.

In 12.04 I think it is /home/<user-name>/.gvfs/<share-name> but not sure if Clementine will see hidden folders worth a shot though.

Update here.  Hope that someone finds this usefull.
On Linux Mint Mate Desktop Ulyana 20.00  using gio:
gio mount smb://server-name/share-name
will mount share in:
/run/user/value/gvfs/'smb-share:server=server name,share=share name'

I tested this as well on my latitude e6420 running Ubuntu focal with Mate desktop, the same results.


Find all files on the filesystem that I have edited or created In Ubuntu, is it possible to obtain a list of all files on the filesystem that I have edited? I need some way to find all the files that I have modified or written (because these files tend to be the most important to me, and I need a way to identify them so that I won't accidentally delete them.)

Using find command you can list the files created/edited by a user.

find / -mtime -10 -type f -user userid -print

This will search all the files created/edited in last 10 days.

use sudo if you are searching the files under / file system and if it's only your home directory($HOME) ignore sudo command.


How can I extend the desktop onto an external monitor/projector? I've plugged in a projector into my laptop and I'm attempting to extend the desktop onto it (so that I can run a full screen app on the projector and have the controls on my laptop).

I'm able to mirror the screens effectively (it does this by default) but I can't extend it. When I untick "Mirror screens" and press apply it asks me to log out and then back in again but it goes back to mirroring the screens.

I'm able to extend desktop on to my external monitor at home, just not this projector. Is there a manual way or other way to do this other that through Monitors setting?

My computer model is Dell Studio 1555: Pentium Dual Core T4300(2.1GHz,800MHz,1MB), 4096MB 800MHz DDR2 Dual Channel, 512 MB ATI Mobility RADEON HD 4570 using the ATI proprietary driver. My screen resolution is 1366x768 (16:9)

The projector that it wont connect properly is a Hitachi CPX3. That page specifies that it's especially designed for projectors that use 16:10 aspect ratio, but considering my external monitor at home uses 4:3 should the differences in aspect ratio matter or be causing this error?

You can try hit win+P this shortcut configures the monitors switching between mirroring and extending the new output.

It is my understanding that laptops cannot use a dual screen feature. You may want to check the specs of your machine, otherwise, you may just be running into a wall. Let me be a little more specific, it is my understanding that you cannot extend your desktop onto a second screen with monitors. That feature would rely on the graphics card.


Why is my fresh install of 12.04 running slow? Hey guys I'm a new linux user, I figured it would be the best for the laptop I just purchased because it's said to be faster than Windows 7. I'm currently dual-booting with Windows 7 Professial and Ubuntu 12.04.
The laptop I am using is the LG X Note P210

Specs:

Intel Core i5 470UM Dual Core clocked at 1.33GHz

12.5" HD LED LCD Screen at 1366 by 768

4GB DDR3 @ 1333 MHz RAM

Integrated Intel HD Graphics Card

4 Cell Battery with 3150mAh

It comes loaded Windows 7 Home Premium 64-Bit, it runs fine on that but my Ubuntu 12.04 runs slower than it and I don't understand why, it definitely has decent specs to run even a 64-bit operating system and do some gaming. Granted I know it's not the best but for a laptop it does the job so Ubuntu should work especially since it's said to make older units with worse specs run even better.

I'm not all that familiar with coding and all so what are things I can do to optimize speed without overclocking? Boot up is fine, its program response time I believe, once Im in the actual OS, it lags, slows down, apps stop working, take forever to load up apps.

Your slowness may be due to the fact that you are using Intel HD Graphics.
 Linux does not have very good 3D graphics support for Intel Chips. Also, in 12.04, Compiz eats a lot of memory. Use a 64 bit Ubuntu with either Gnome 3 or Cinnamon desktop for graphics effects. They use less amount of memory than compiz. Or if you want, you can use Unity-2D, faster with no 3D effects. 32bit Ubuntu cannot use more than 2 GB of RAM. If you use 64 bit, Ubuntu will use 3.7GB of RAM

I had similar experience with my Xubuntu 12.10 running on SSD, it was able to boot to the Xfce desktop within 8-10 sec from cold start, but somehow the boot time gets delayed to 1 ~ 2 minutes one day, I tried all different tweaks I googled but still without any luck.  however, the problems finally solved after I tried to clear & rebuild the font cache by the command: "sudo fc-cache -fv" I guess the broken font cache may have caused the problem during login.


How do I add a network drive to Plex? So I've been looking around and can't find an exact solution to my problem. I dual boot Windows 7 and Ubuntu 13.04. I like Ubuntu and want to use it instead of windows. Everything was working on Ubuntu 13.04 running PMS and a external USB HDD hooked up to it until I got a NAS WD MyBookLive 3TB drive. So I understand with this there are shared folders on this drive. I created a folder called Plex which then has sub-directories:

"MyBook" is the name of the drive

MyBook/Plex/Movies
MyBook/Plex/TV Shows

I don't know how to mount/map this properly to keep this mounted every time there is a reboot needed. Also I just don't understand how to add it into plex. I know this will be fixed when the shared folder "Plex" is mounted/mapped correctly. I just can't get plex to see it. There isn't a username or password needed to get into the shared folder "Plex". So credentials aren't needed.

IP address of the mybook is 192.168.0.13.

I have read various things and tried several different things, but no luck. If someone could help me I would be grateful. The drive is NFS and Samba compatible.

I don't believe Plex has any way to access drives from a network location, but like this thread on Plex for Mac suggests - http://forums.plexapp.com/index.php/topic/58993-add-folder-from-local-network-nas-hdd-in-plex-server-library/ - if you are able to mount them within the local filesystem, then you should be able to do it with no problem.

[I'm kind of modeling this after the answer to this thread: How do I access an external hard drive plugged into my router? ]
I'm not really that familiar with NFS, but this is how you can do it with CIFS (the successor to Samba - should be compatible with your MyBook if MyBook supports Samba).

You'll need to decide where you want the mounted files from MyBook to appear in your filesystem. I would suggest something like /media/Plex. Once you decide, open a terminal and type:

sudo mkdir /media/Plex

(This assumes you don't already have that directory. You'll need to enter your password, because usually only the operating system edits things in /media)

Now, let's install CIFS Utilities:

sudo apt-get install cifs-utils

Then, you'll want to edit your /etc/fstab - this is what tells Ubuntu what to drives to mount (and where) when it starts up. You may wish to backup /etc/fstab first (in case something goes wrong your you want to undo this easily). You can do this by entering in terminal:

sudo cp /etc/fstab /etc/fstab.bak

(Now you've got a backup copy called fstab.bak)

Next, to add your NAS. Still in the terminal, type:

sudo gedit /etc/fstab

This will open /etc/fstab in the text editor with write permissions. Don't touch anything already added to the document, but add to the end of that document this line:

//192.168.0.13/Plex /media/Plex cifs guest 0 0

Since you said there's no password, guest should work.

*Sidenote: If you use a password protected NAS, use this line instead:

//192.168.0.13/Plex /media/Plex
username={{username}},password={{password}},iocharset=utf8,sec=ntlm  0  0

And replace {{username}} and {{password}} respectively.*

Now, to test, type in terminal:

sudo mount -a

And open Nautilus (the file manager). Your MyBook's Plex folder should now show up in the left-hand sidebar!

So, also, you should now be able to "Add Section" in the Plex Media Server web UI by clicking the big + sign in the My Library section (below in red).

Select the type of media, and then you should be able to select the Movies or TV shows from your new /media/Plex folder (which is really your MyBook). I did the same thing with what I have available (I don't own a MyBook, but I did the same thing with my readyshare, and here it is after mounting it in /media/readyshare, ready to be added as a Plex section:)

On my thecus nas was having problems getting plex to read usb drives.  enabled samba and nfs on the usbhdd directory, dont know which worked but plex now sees the media.


encrypted 13.10 will not reliably boot EDIT:
SOLVED! see https://askubuntu.com/a/403876/212688

i re-installed ubuntu 13.10 x64 on my vaio pro, in legacy, bios mode. the installation is lvm/luks encrypted and thus asks me for the encryption password before booting.

it does not reliably boot. i often have to try several times, those are the errors i get:

... alert! /dev/mapper/ubuntu-vg-root does not exist ...

and sometimes it "boots" without asking me for the password and then fails with cryptsetup: cvms_activate is not available

this happened on my old install, i fully wiped the ssd and the problem still persists. how can i fix this?

and does anyone have an idea, why booting takes over one minute? the pci-e samsung ssd reads with around 800MB/s that should boot in 15 seconds or less.

my macbook with a slow sata3 ssd boots in 20 seconds, with full disc encryption.

edit:
crypttab:
http://paste.ubuntu.com/6673077/
fstab:
http://paste.ubuntu.com/6673078/

i didn't mention it before, but i used the defaults of the installer and didn't create my own partition layout. just install with internet and getting updates during the install, reboot into system, install updates and then i had the error, again, like in my previous install.

I have been following this problem(or a variation of), that I also have, for about a year. The only way I can even boot is with a very old kernel.  This is an unsolved bug going on 2 years ( https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1003309 ).  Some people have fixed this problem, it usually entails major surgery into the bowels of your system ;), your mileage may vary.  None have worked for me and I am reluctant to do something like reinstall kernels, when every kernel I have installed in a year has not worked. May I suggest that the complexity of the boot system itself is the problem.  If you want to throw something else in there, like encrypting your disk, you are just asking for trouble.  So here is my solution:

Remove disk encryption.
reinstall or follow this guide How to stop using built-in home directory encryption?
To encrypt your data use the program Cryptkeeper.  This is an excellent, elegant program that doesn't muck up anything else on your system.  In other words it is everything disk encryption is not!

I doubt that an easier or more reliable solution will show up here.

We think the problem is that the OS didn't install properly.

Solutions:

Reinstall Ubuntu OS with you favorite. (Select full disk encryption.)
If that does not work just backup and select "Erase Disk and Install Ubuntu 13.10" in Install Type with you favorite also. (Select full disk encryption.)


How can I change the filename timestamp? I have dat files' names in chronological order:

FileName_YYYY_MM_DD_HHMM.dat

Is there any commands for adding 30 minutes to each timestamp?

Using python :

#!/usr/bin/env python2
import glob, re, os, datetime
os.chdir('/path/to/dir')
for f in glob.glob('*.dat'):
    ini_time = datetime.datetime.strptime(re.search(r'(?<=_)(?:\d|_)+(?=.dat$)', f).group(), '%Y_%m_%d_%H%M')
    fin_time = (ini_time + datetime.timedelta(minutes=30)).strftime('%Y_%m_%d_%H%M%S')
    os.rename(f, 'Filename_' + str(fin_time) + '.dat')

os.chdir('/path/to/dir') will change the current directory to the directory containing the .dat files. Replace /path/to/dir with the actual path.
glob.glob('*.dat') will find the files ending in .dat
ini_time variable will at first cut out the date-time from the original file name using re module and then sort out which entry represents what in the string that is taken out so that we can add the required time to this
fin_time will contain the resultant time i.e. ini_time plus 30 minutes
os.rename will rename the file accordingly.

Also note that, with successive file names (differed by 30 minutes) the renamed file will overwrite the next one, hence it it is better to add the seconds to the renamed file name so that it remains safe. Otherwise you need to save the renamed files to a different directory and then replace them with the original ones later.

You may use this code to do what you need assuming

you should take backup and test the code first to see if it's suitable for your case
you are using 24H format
no files will be named after 23:29 (if you
have files after that time the code should be modified to change the date also )

the code is :

cd /path/to/the/files

for i in `ls`; do MM=${i:(-6): -4}; HH=${i: -8 : -6 }; NAME=${i: 0 : -8 } ; if [ "$MM" -lt 30 ] ; then  NEWMM=$((10#$MM+30)); mv -f $i $NAME$HH$NEWMM.dat ; else NEWHH=$((10#$HH+1));NEWMM=$((10#$MM-30)) ; mv -f $i $NAME$NEWHH$NEWMM.dat ; fi ; done ;

How it works:
The code will check the minutes part in the file name  MM then if it's less than 30 it will add 30 to the MM if it equals 30 or more it will add 1 hour to the HH part in the name and deduct 30 minutes from the MM part of the name


How can I tell state of program seemingly running I had Firefox running, then (possibly) as a result of a key combination I don't recall, it quickly vanished from screen and Task Bar/Window List.

ps ax | grep firefox returns the below+the unneeded grep firefox line (Both ps and the GUI Task Manager, show firefox with seemingly unchanging RSS, VM-SIZE and 0% CPU usage):

johndoe      1916 36.6 14.0 923772 504372 tty1    Sl   13:30  12:15 firefox

*CORRECTED*
pstree | grep firefox returns:

init─┬─2*[ROX-Filer───firefox───25*[{firefox}]]

How can I tell what state the program is in?

It's probably a zombie process.

  Z    defunct ("zombie") process, terminated but not reaped by its parent.

If you run ps ax | grep firefox it will show you the status of the process, you can check against this list of status of the process (you must read the STAT column). Sadly, is unlikely that without fiddling with debuggers you can recover your data.

tree probably doesn't show you the process for the same reason.

Personally, I like top run from the command line. Works to find that one app that is slowing everything down.


How can I make Unity 2D the default session at start-up? I want Ubuntu to always use Unity2D by default. I am using the latest version (12.04 LTS).

when logging in there is a symbol in the top right of the box (usually a ubuntu logo unless using something else) click on the logo and then click ubuntu 2D , if you dont change this , you will always log into unity 2d

Just log-in unity-2d, under System Settings -> User Account, unlock and enable Automatic Login.

My ubuntu 12.04 enables auto-login while installation. It auto-login last session I logged in.


After restart, how can I ssh into my system? I have restarted my system remotely, but now when I try to ssh, I get the message

ssh: connect to host desktop.hostname port 22: Connection timed out

And when I try to ping it:

PING desktop.hostname (111.111.111.11) 56(84) bytes of data.
From localhost (222.222.222.22) icmp_seq=1 Destination Host Unreachable

Is there a way to remotely access my computer?

By default, connection to network go up when the user login. So, if you have not configured your machine to login automatically, your network connection is down.

The solution is to set the connection as a "system connection" in network manager: in this way the connection go up when the machine boot up, and do not wait for a user to login.

Unfortunately a remote Linux server may not always re-start correctly, and will then require human intervention (on site).

This can sometimes be resolved using out-of-band equipment, which supports power-cycling (on, off) and/or a serial console connection.


Outlook 2010 via wine is installed, but can't add an account / Ubuntu 14.04 I have installed MS Office 2010 using wine on Ubuntu 14.04. When I open Outlook and try to add new account, I see following:
http://www.imagebam.com/image/e0d8c2344431849

I press "Add account" and "Account settings -> Account settings", but nothing happens.
Could someone help me with this case?

Thanks!

Ok  so You could use a virtual machine to solve this, in which case, you would have the windows control panel, and the "mail" applet, where you could configure an address manually. I might be safe to assume that the same issue wouldn't be happening in the first place within a virtual machine, but if it were, again, you would have access to the control panel, where you could implement instructions like these for manually adding a mail account.

Unfortunately, wine doesn't have the control panel in the same way that MS windows has it.
It does have Control.exe its own implementation which doesn't offer the same features. I dont personaly have outlook 2010, but you could look to see if you have a Mail icon in the wine control panel $wine control  presumably if you do have it, you can use it to edit your mail settings manually. I have no way to know that.

I want to note that Linux offers a wide array of e-mail clients, such as Evolution. which will work natively.

You might try some of the applications in the programs folder for outlook to troubleshoot the installation. like safemode.  perhaps you will be able to install via safemode. see the folder:C:\Program Files (x86)\Microsoft Office\Office14\

A corrupt pst file could also create errors for outlook. Try running scanpst.exe (from the office14 folder)

Finlay if none of those work, you could try editing the pst file.
many free pst file editors exist. The PST file is were outlook stores its data on users and contacts. You may have to do some hacking on the pst file to manually create new users. Its been about 3 years since Ive even looked at outlook. http://www.ehow.com/how_6064889_edit-pst-file.html

Back up your pst files before you edit them. Good luck.

This helped me

~/.wine/drive_c/Program Files (x86)/Microsoft Office/Office14> wine rundll32.exe shell32.dll,Control_RunDLL MLCFG32.CPL

but outlook 2010 work unstable on wine 4.4, with many errors


How do you find and use programs that have been installed on Ubuntu? I recently installed a program using the terminal command sudo apt-get install, and I want to locate and use it, and delete it. (I only did it as a test and had no actual use for the file). Where can I locate the program now?

To locate it it, use the following command :

dpkg -L package_name

Alternatively, you can search it in Unity by pressing the launcher and typing the name of the application or package you installed.
To run it as a normal user, open the terminal and type in the application name, that is, the command of the application. As an example, to run rhythmbox music player, you just opn the terminal and type in rhythmbox, and it will open.

To uninstall an application, you need aministrative priviledges, hence the need to use sudo in a command line. In uninstalling, open the terminal and type in

  sudo apt-get remove application_name

and the applicaton will be removed. To remove everything that was added to the machine, including the installation folders and cache files, use :

  sudo apt-get purge application_name

You could use the Synaptics Package Manager. To install it, run

sudo apt-get install synaptic

in a command line.

You should be able to find your package here.


Can I upgrade from 12.04.5 (Precise Pangolin) to 14.04.5 (Trusty Tahr) and use Gnome (3.x or 2.x) as my main desktop environment? (Important for readers and AskUbuntu editors: I know my 12.04 has reached its EOL, but I'm asking for an upgrade, so please do not set my question as off-topic.)

I'm using Ubuntu 12.04.5 LTS Precise Pangolin as dual-boot with Windows 7.
I know that my installation has reached its End Of Life and I was wondering if I could upgrade from 12.04.5 LTS to 14.04.5 LTS, but with some modifications. My graphics card is not fully supported for the Unity 3D Interface, so I was wondering if I could upgrade to Trusty Tahr, remove Unity somehow and add GNOME (3.x or 2.x, whatever it installs) and use it as my main desktop environment. I have also tried GNOME 3 (using a Debian 8 live DVD) and my PC can handle that. With GNOME 2 (Classic/Fallback Session), no problems at all.

So, can I do so? Can I upgrade to 14.04 and use GNOME as my main desktop environment?

My computer specifications:

Dell Optiplex GX270 SFF (Small-Form-Factor)

Operating Systems: Windows 7 & Ubutnu 12.04.5 LTS Precise Pangolin
Partitioning: Windows 7 (/dev/sda2, NTFS, 5.80/40.80 GB free)
             dev/sda3 -> Extended Partition (Ubuntu + Swap)
             Ubuntu (/dev/sda5, ext4, 5.02/14.00 GB free)
             Swap Partition (/dev/sda6, linux-swap, 1020.00 MB)
Motherboard: Dell Corp. 0YF936
RAM: 1024 MB (1GB)
CPU: Intel Corporation Pentium 4 @ 2.40 GHz
Graphics Card: Intel HD Graphics 82865G, 1280x1024
Hard Disk: Western Digital WD600BB-00CA

Thanks in advance,

Bajiru

I installed 14.04 and it's working fine (with GNOME Flashback)

I deleted my previous 12.04.5 LTS installation (because upgrading is as slow as hxxl and I backed up my files), I installed 14.04.5 LTS this morning, logged in, installed GNOME, and it was working! I am using now GNOME Flashback (Metacity) because the others are slow (GNOME 3 Normal is the slowest of all GNOME desktop environments on my PC, Unity is the slowest of all) and I am OK. I found the answer to my own question!

Bajiru

(P.S.: Sorry for the h- word above)

I don't understand why you can't just upgrade to 16.04.

I'm running 16.04 on an older machine with Xfce desktop (which I highly recommend, but that's beside the point). The xwindoing environment really doesn't have much to do with the actual system, meaning you can purge or install it like a program.
Press Ctrl+Alt+F1 to get into a tty session (you want to be out of Unity) and run the following:

sudo apt-get purge unity-desktop

Once it finishes:

sudo apt-get install gnome-desktop

Then restart:

sudo reboot

Now you may not be able to install gnome before you upgrade, so I would upgrade first:

sudo do-release-upgrade

And then once the machine boots into 16.04, enter the tty session when you get the login prompt and run those commands.


I want to copy a directory from one place to another via the command line I want to copy a directory from one place to another folder.

sudo cp is the command, but after that what should I type? The destination or source first?

The -a flag is probably what you are looking for:

cp -a /path/from /path/to

The -a flag turns on recursive behaviour (which can also be done with the -R flag), and will also attempt to preserve metadata such as file ownership, permissions, timestamps, links, etc.

You should only need to use sudo if you are copying to a location not owned by the current user, if the current user doesn't have read permissions for the files being copied, or if you want to preserve ownership on files not owned by the current user.

I think the better way is to use gksu nautilus command and you can copy whatever you want with common GUI as usual.


No options of ubuntu and windows 10 in grub menu when I dual booted I dual booted my windows 10 pc with ubuntu (HP i5 7th gen) using usb flash drive method. It asked me to restart but when I restart the computer (with usb connected) there are no options for windows 10 or ubuntu.. It is like this,
                    GNU GRUB version 2.02
Try Ubuntu without installing
Install Ubuntu
OEM install (for manufacturers)
Check disc for defects

Thats all.
When I tried installing it again, it says Ubuntu 18.04 is already installed.. but I can't find it where.
When usb is not connected and I start the computer.. windows 10 automatically opens.
Please help me with this...
P.S: I turned off secure boot in UEFI settings

Remove the USB drive and boot, then see if Windows and Ubuntu show in the menu

In BIOS - settings you should disable UEFI and enable LEGACY - it could be that this helps. For BIOS - settings you need to press key 'F2' when booting your machine. Check too in BIOS - settings how USB-ports are supported and if they are enabled.


Scripting Directory and SubDirectory Creation Based on User Input Hello just a noob hobbyist here so this hopefully isn't too simple of a question.

I am trying to write a script that will let me generate the entire file structure for my media using only user inputs. I have everything working execept at line 20 where the 'mkdir Season{1..$user_input4} lives. I would like it to take the user input_4 and make 1 + that many directories but I feel I may be looking at this from the wrong perspective as it instead makes a subdirectory named Season{1..(prints the user input)}.

#!/bin/bash
file_created="Directory Created"
directory_number=0
echo "How many directories should be created?"
read user_input
while [ $directory_number -ne $user_input ]
do
    echo "Enter Directory Name"
    read user_input2
        mkdir $user_input2
    directory_number=$((directory_number + 1))
echo "Do you want to create Seasons? Y/N"
    read user_input3
    if [ $user_input3 == "Y" ]
    then
        echo "Enter number of seasons"
            read user_input4
        cd $user_input2/
        mkdir Season{1..$user_input4}
        cd ..
    else
    :
    fi
done

If anyone has any ideas they would be greatly appreciated. Thanks!

It doesn’t work this way because:

  The order of expansions is: brace expansion; tilde expansion, parameter and variable expansion, (…).
  [man bash, highlighting added]

Brace expansion happens before the variable is expanded and can only see {1..$user_input4}, which of course is not valid.

Another possible problem: If $user_input4 happens to be very big and you thus get a very long list of directory names you may exceed the shell’s ARG_MAX limit, which will make the command fail. You can use seq to create the number sequence, printf to create a zero-delimited list of arguments and xargs to call mkdir as often as necessary to work around that. Of course it’s save to use with a smaller number of arguments as well, so that’s the way to go if you’re dealing with both an unknown number and nasty vicious users:

printf 'Season%s\0' $(seq 1 $user_input4) | xargs -0 mkdir

If you want the number sequence to end at $user_input4 + 1, just replace the variable with the arithmetic expression $((user_input4 + 1)), e.g.:

printf 'Season%s\0' $(seq 1 $((user_input4 + 1))) | xargs -0 mkdir

To my knowledge, mkdir does not accept a range of directories, at least not in the format you are trying to use it. You are creating the seasons almost like an array. But you have to pass them one at a time with spaces between them if you want to create more than one directory with the mkdir command.

Since you are accepting a numeric value in user_input4, you could try counting down from the value of user_input4 until you reach zero using a while loop.

while [ $user_input4 -gt 0 ]
do
  mkdir Season${user_input4}
  let user_input4=${user_input4}-1
done

The loop will naturally stop when user_input4 equals zero. Or if you needed one more than the number, just use -ge (greater or equal to). The only catch with this method is that it will create the directories in reverse order. So if user_input4 is "3", then the order would be:

mkdir Season3
mkdir Season2
mkdir Season1


Will installing a program from the Software Center also include updates from its PPA? For example I installed VLC from the Ubuntu Software Center would it also include VLC's PPA repository so that when my laptop would do a software update, VLC updates would automatically be included for updates? Or should I manually add VLC's repository via terminal despite installing VLC through the Software Center?

No, installing a program from the Software Center will not automatically include the PPA

If you want updated versions of e.g., VLC, that are only available in the PPAs and not in the official repositories, you will have to add the PPAs manually, regardless of whether you have already installed VLC from the Software Center or not.

Now, once you have added the PPA, Software center will use it to update those particular programs.

  Warning: While the software in PPAs is often newer, it may also be unstable, partially incompatible, etc. -- remember that it has not been extensively tested by the Ubuntu team as the official versions are.

  Please see these related questions for details about PPAs:

  What are PPAs and how do I use them?
  Are PPA's safe to add to my system and what are some "red flags" to watch out for?

Typically apt does include PPA repositories if the PPA has a newer version available, and Ubuntu Software Center uses APT, so if the PPA has a newer version, it will use the PPA. If the PPA has a older version, it will use the repository with the newer version.


kubuntu 10.04 + ppa:kubuntu-ppa/backports - is it really stable enough? I have kubuntu 10.04 32bit. I'm having some problems with some kde apps.
I have read around that installing the updates from the  ppa:kubuntu-ppa/backports would help.

I know that the kubuntu ppa are unofficial ubuntu repo but are directly maintained by the kubuntu team, to provide important updates to the kubuntu users
https://wiki.kubuntu.org/Kubuntu/KubuntuPPAs
https://help.ubuntu.com/community/Repositories/Kubuntu

I'd like to know from other people that have kubuntu 10.04 + ppa:kubuntu-ppa/backports.
Is this solution working really well? Is it stable enough?

I'm confused 'cause if I add the repository, and take a look on what an update what do, I have different results if I check with kpakagekit or with aptitude

packagekit

update 116 packages
26 packages will be marked as blocked (network-manager kdebase-bin plasma-widgets-workspace)

aptitude

82 packages to install
13 packages to delete (kdebase-plasma kdepimlibs-data ecc)
142 packages to update

wich program should I use to do this? Aptidude ore KPackageKit?

Why do you use 10.04 in the first place? There are newer versions. Perhaps you would want to have a look at 11.10, for instance?

I enabled the  ppa:kubuntu-ppa/backports and i run the update.

All my bugs are still there, plus OpenOffice is not working anymore.

These is more than enough.


Install eclipse for java I have eclipse kepler cdt for c++ but I want to download eclipse for java and keep eclipse cdt
I mean use eclipse for both Java and c++

Eclipse is normally a standalone program. Go a head download the eclipse for java save it to a different location and always navigate to the directory to run it

In my experience Netbeans is a lot faster on Ubuntu than Eclipse. But you should be able to install a Java extension for Eclipse?
No answer to be found here? https://help.ubuntu.com/community/EclipseIDE


How to get Asus XG-C100C 10G ethernet card working on Ubuntu 18.04 Is there anything you need to do to get this network card working in 18.04? It was working fine in 16.04 with the “atlantic” driver built from sources provided by Asus. After upgrading to 18.04, I can see that driver now seems to be included in Ubuntu, and I can see the card using lshw  -class network, but syslog shows the ethernet link is down.

There were bigger issues with networking. It wouldn’t work with the built in gigabit ethernet port either. I had to setup netplan to get that working. However, for the 10G card, running “networkctl” it shows “no-carrier” / “configuring” for this interface, even if the ethernet cable is connected.

So I'm not sure if I@m missing something? Are there more steps to take to get it working? or is there a bug in the 18.04 atlantic driver?

Also, do I now need to remove any packages to get rid of the old style “ifup / ifdown” and avoid any conflicts with netplan?

cheers

Edit: I tried a fresh install of Ubuntu 18.04 Server, and the installer has the same problem (i.e. shows 'no-link' for this NIC).

As pointed out in the comments below by @binaryanomaly, there's a bug in the kernel supplied with 18.04 for this NIC. It's fixed in kernel 4.16.6.

Edit: added the /etc/netplan/01-network-manager-all.yaml file

# Let NetworkManager manage all devices on this system
network:
  version: 2
#  renderer: NetworkManager
  renderer: networkd
  ethernets:
    enp1s0:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.0.12/24]
      gateway4: 192.168.0.1
      nameservers:
        addresses: [192.168.0.2,192.168.0.1]
    enp5s0:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.0.11/24]
      gateway4: 192.168.0.1
      nameservers:
        addresses: [192.168.0.2,192.168.0.1]

You do not need to remove any packages to eliminate ifup and ifdown from your system.  These commands will only have an effect for network interfaces configured in /etc/network/interfaces.  You can even have some interfaces managed through /etc/network/interfaces and some managed through netplan on the same system.

If your interface is showing as "no carrier", this is most likely a driver issue, not a netplan issue.  You can rule out netplan by removing the interface from your yaml and attempting to configure it directly using ifconfig or ip.

Musaul had good information

in Kernel 4.15 and 14.16 you may encounter instability due to Debian kernel incompatibility  with dirty wake WOL feature in the firmware of XG-C100C.

Details in comment 41 of kernel bug #199177

Workaround might be included with Kernel 4.16.6 in release app june 2018, so make sure you avoid kernel between 4.15.16 and 4.16.5 with your network card.


HP Pavilion 15-e043CL AMD - Wifi not working Just got a HP pavilion 15-e043CL from Costco for my kids.  The laptop is supposedly preloaded/running Windows 8.  I did not even try to load Windows.

I right away loaded Ubuntu 13.04 from a live CD (no harddrive installation yet). I just want to see how Ubuntu would perform before installing it.   I was able to get the laptop on the network using a CAT5 cable using eth0.  So the laptop can see the network/internet using a wired connection.

However, I don't seem to be able to get the Wifi to work.  The Wifi button (near the F12 button/wifi antenna) is orange (supposedly working) but it seems that the base installation might not have the proper drivers.  I'm far from being a Linux guru so please point me to the proper direction.  Maybe the drivers are not available for 13.04? Should I try 12.10?

Thanks
T

Per Braiam's suggestion, I'm providing the answer to my earlier question.

After much search on the internet, I figured out that the Wifi adapter is a RealTek RTL8188EE 802.11 bgn adapter. With that information, I started to Google around to figure out if a driver/solution existed.

I ended up installing Ubuntu 12.04TLS (from ubuntu-12.04.2-desktop-amd64.iso) on the hard drive instead of running from the DVD.  Then I followed the steps from this forum  that talked about the drivers for RTL8188EE device.  Please read the very well documented steps.

The drivers were easy to install. The WiFi of HP Pavilion 15 - e043CD is now working.  My kids are now happy!

HP has knowingly put faulty Realtek RTL8188EE WiFi adapters into their products since June 2014.  This is a known issue that HP refuses to address.

I spent 2 months trying to figure out the problem.  I spent 5 hours on the phone with Microsoft and they couldn't fix the issue...even after remotely taking over my computer.  I spent $50 on a NetGear external WiFi adapter...and it worked great.  However, since my computer is less than a year old, I shouldn't have to have an external.

The problem is the internal WiFi adapter itself.  It is a faulty component that people have been complaining about since 2014. I called HP's corporate office and stated that I was aware that they knew of the issue, and could provide more than 10 pages from just one thread of their HP Forum where hundreds of others, were having the same issue.  I threatened them with a class action lawsuit if they didn't do something about it immediately.

They have agreed (in writing) that they will fix my laptop and replace the WiFi adapter card FREE OF CHARGE.  I suggest that every one else, who is experiencing this issue, call the HP Corporate office at : 650-857-1501.  Press "0" and speak to an operator.  Tell them you want to speak to a US Case Manager about this ongoing issue.  IF the case manager refuses to assist you, then call the Corporate office number back, press "0" and ask to speak to an "Executive Customer Relations" associate.  They WILL (AND MUST) FIX THIS KNOWN ISSUE AT NO COST TO YOU!

Apparently, this is such a "hot topic" that, with what I know about this issue, I am being "silenced" on the HP forum.  They don't want people to know that they can fix it by replacing the adapter with one that is NOT a Realtek component.  They don't want you to know that you have RIGHTS as a consumer!


Can't locate packages vesta, vesta-nginx and vesta-php I have a problem with installing Vesta Control Panel on my DigitalOcean VPS on Ubuntu 12.10. The system is updated and upgraded.

I got the following error message:

W: Failed to fetch http://apt.vestacp.com/quantal/dists/quantal/vesta/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vesta
E: Unable to locate package vesta-nginx
E: Unable to locate package vesta-php
Error: apt-get install failed

The package doesn't exist on apt.vestacp.com, or maybe your version isn't supported or you haven't updated your apt database. In your specific case Ubuntu (it is 12.10) is not supported, but at the web-site of Vesta it was added in list of supporting.

I fixed this error after running below command before bash vst-install.sh.
apt-get update
apt-get install gnupg


changing /etc/environment did not affect my environment variables I'm trying to install Euler expert system following these instructions. To add the environment variable I edited my /etc/environment to become as follows:

 PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:
/home/mohammad/Desktop/eye"
 EYE_HOME = "/home/mohammad/Desktop/eye"

But when I use printenv PATH I don't see the new directory added to my path.

What am I doing wrong here?

I don't know the reason why PATH wasn't changed (after relogin), but

EYE_HOME = "/home/mohammad/Desktop/eye"
--------^-^

those spaces prevent EYE_HOME to be set.

It should be noted that /etc/environment is not a script file, but a kind of assignment file that is read by PAM. OTOH such spaces are not allowed in script files like /etc/profile and ~/.profile either.

If you use a script file, you need to export the variables as shown in Avinash Raj's answer.

Please note that while ~/.bashrc works if you start your program from a terminal window, it may not work if you start it from the graphical environment, since it's not sourced by the display manager.

You want to edit your .bashrc file in your home directory.

When you edit the path you should include :$PATH on the end so you don't replace the current path.