Just installed Debian - Having trouble connecting to wireless network

I know this question has been asked before but none of the solutions are working for me. I just installed Debian and I'm relatively new to Linux. I'm running Debian 7.4 (Wheezy) with Gnome desktop. At the moment, I'm connected to the Internet via Ethernet cable and I'm having trouble connecting to a wireless network. My network uses WPA2. I've tried connecting with wpa_supplicant but so far that hasn't worked. I don't know where I'm messing up. It would be great if someone with experience in this could help me out. Thanks. Note: Just let me know what information you need (for example, the output of a certain command) and I will supply you with that. Edit: I followed http://askubuntu.com/questions/138472/how-do-i-connect-to-a- wpa-wifi-network-using-the-command-line and when I execute               wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext && dhclient wlan0         I get the following error:               Could not read interface wlan0 flags: No such device     WEXT: Could not set interface 'wlan0' UP     wlan0: Failed to initialize driver interface


Which Desktop Linux version can run decently on For P4 & 750MB Ram

I just installed Ubunta 13.10 on an old P4 with 750MB Ram, but the system is running too slow to be used for anything. I had XP running on it and worked fast enough to use, but I decided I wanted to try Linux because I read it would run faster on it. 1)Ubunta did not appear to reformat the harddrive, I don't know if that should have been done or not, but it appeared to install right over XP. Is there some method of installation, other than booting the ISO and following the steps to install that would make it run faster? 2)Is there a better desktop version of Linux would run faster on a P4 with 750MB of RAM.


How are signals implemented in Linux?

When one process sends a signal to another process, does receiving process wait until it is rescheduled to run? So if every 1 ms we choose one process to run, does that mean the latency from generating the signal to delivery of the signal is around 0.5 ms? (Suppose we only have two processes.)   And more generally, how are signals implemented in Linux?


Execute commands on TMUX Detach

Is it possible to execute commands on tmux detach? I usually have a rails console and server running in the tmux session, on detach is it possible to automatically end those? Thanks.


Routing for multiple uplinks/providers

I have a PC with two internet connections. The first one is an Ethernet interface to connect to my local network and access internet via my router. The second one use a GSM modem to connect with ppp. I would like to be able to use each connection independently when specifying the interface, e.g.:               ping -I eth0 www.google.com     ping -I ppp0 www.google.com      And to be able to use eth0 by default if no interface is selected and the connection via eth0 works but ppp0 if the connection via eth0 does not work. I read the this article and created the following rules:               # Main table     ip route add 10.0.0.0/24 dev eth0 src 10.0.0.100     ip route add 10.64.64.64 dev ppp0 src 10.123.122.101     ip route add default via 10.0.0.1          # Specific tables     ip route add 10.0.0.0/24 dev eth0 src 10.0.0.100 table eth0     ip route add default via 10.0.0.1 table eth0     ip route add 10.64.64.64 dev ppp0 src 10.123.122.101 table ppp0     ip route add default via 10.64.64.64 table ppp0          # Rules     ip rule add from 10.0.0.100 table eth0     ip rule add from 10.123.122.101 table ppp0      At first it seems to work. However the eth0 table seems to be never used. I expected the following to happen:               ping -I eth0 www.google.ch    # Use default gateway in table eth0     ping -I ppp0 www.google.ch    # Use default gateway in table ppp0     ping www.google.ch            # Use default gateway (main)      However if I remove the default gateway (main) the eth0 interface does not work at all. There is obviously something I don't understand. Can you explain me how to achieve what I want? EDIT according to @derobert answer: I tested the following configuration but still get the same error (ok for ppp0 but not working for eth0). Routes:               # ip rule list     0:      from all lookup local     1500:   from 10.0.0.100 lookup eth0     1501:   from 10.123.122.101 lookup ppp0     2000:   from all fwmark 0x1 lookup eth0     2001:   from all fwmark 0x2 lookup ppp0     32766:  from all lookup main     32767:  from all lookup default          # ip route list table eth0     10.0.0.0/24 dev eth0  src 10.0.0.100     default via 10.0.0.1 dev eth0          # ip route list table ppp0     10.64.64.64 dev ppp0  src 10.123.122.101     default via 10.64.64.64 dev ppp0          # ip route list table main     10.64.64.64 dev ppp0  src 10.123.122.101     192.168.1.0/24 dev eth1  src 192.168.1.1     10.0.0.0/24 dev eth0  src 10.0.0.100      Firewall:               # iptables -L     Chain INPUT (policy DROP)     target     prot opt source               destination     ACCEPT     all  --  anywhere             anywhere          Chain FORWARD (policy ACCEPT)     target     prot opt source               destination          Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination          # iptables -L -t mangle     Chain PREROUTING (policy ACCEPT)     target     prot opt source               destination     CONNMARK   all  --  anywhere             anywhere            CONNMARK restore     RETURN     all  --  anywhere             anywhere            mark match !0x0     MARK       all  --  anywhere             anywhere            MARK set 0x1     MARK       all  --  anywhere             anywhere            MARK set 0x2          Chain INPUT (policy ACCEPT)     target     prot opt source               destination          Chain FORWARD (policy ACCEPT)     target     prot opt source               destination          Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination          Chain POSTROUTING (policy ACCEPT)     target     prot opt source               destination     MARK       all  --  anywhere             anywhere            MARK set 0x1     MARK       all  --  anywhere             anywhere            MARK set 0x2     CONNMARK   all  --  anywhere             anywhere            CONNMARK save          # iptables -L -t nat     Chain PREROUTING (policy ACCEPT)     target     prot opt source               destination          Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination          Chain POSTROUTING (policy ACCEPT)     target     prot opt source               destination     SNAT       all  --  10.0.0.1             anywhere            to:10.0.0.100     SNAT       all  --  10.64.64.64          anywhere            to:10.123.122.101      I removed all the other firewall rules to be sure they do not interfere. I get this results:               # ip route get 8.2.1.1 from 10.0.0.100     8.2.1.1 from 10.0.0.100 via 10.0.0.1 dev eth0          # ip route get 8.2.1.1 from 10.123.122.101     8.2.1.1 from 10.123.122.101 via 10.64.64.64 dev ppp0          # ping -I ppp0 8.8.8.8     PING 8.8.8.8 (8.8.8.8): 56 data bytes     64 bytes from 8.8.8.8: seq=0 ttl=45 time=350.108 ms     64 bytes from 8.8.8.8: seq=1 ttl=45 time=349.768 ms     64 bytes from 8.8.8.8: seq=2 ttl=45 time=329.671 ms     ^C     --- 8.8.8.8 ping statistics ---     3 packets transmitted, 3 packets received, 0% packet loss     round-trip min/avg/max = 329.671/343.182/350.108 ms          128# ping -I eth0 8.8.8.8     PING 8.8.8.8 (8.8.8.8): 56 data bytes     ^C     --- 8.8.8.8 ping statistics ---     5 packets transmitted, 0 packets received, 100% packet loss      The rules seems to be OK but obviously there is another problem. I don't really understand the role of the SNAT here. I added the rules to reflect the configuration of the answer be they might be wrong.


Can a Linux command have capital letter(s)? I know it's supported but i want to be sure if it's a "problem" or considered "not a good thing"?


Use eth interface to connect to a router and wlan for the internet

I am currently trying to configure a router to which I connect to (to its web interface) using an Ethernet cable through the `eth0` interface. That router doesn't have access to the internet. Now, I have access to another network (different IP range and all) that does have access to the internet through my wireless interface `wlan0`. I would like to use `eth0` to only connect to the router I am trying to configure and `wlan0` for the rest of the connections. That way, I could do some research while trying to configure the router. I'm sure it's doable, with some kind of routing but I haven't been able to find anything that works. The issue is that when I plug the Ethernet cable, the system starts using that `eth` connection for everything. To sum up a bit: Assuming the router's address is 10.0.0.1, can I do something to route traffic going to 10.0.0.1 through the `eth0` interface and anything else through `wlan0`? I am using Debian Squeeze.


Is it possible to access a remote computer on a different network using Remmina and Vino and how?

I am using Linux Mint 14. Remmina and Vino is installed on my system. Now I want to access another remote computer (which is in different network and IP is not static). I only want to use VNC. Is it possible with Remmina and Vino? If so, how can I do that?


How to start only one application on booting in RHEL 6?

I want to start only one application without any desktop after booting the system, it is like only application should be there not anything in RHEL 6.


Compile Unix with a custom application

I wonder, is it possible to compile Unix along with a my custom program so that it runs only my custom program on start up of computer, as if my program starting with boot up?


Linux Web Kiosk

Hi I'm having a idea of develop a light weight Linux kernel which will boot and open a web browser in full screen and request data from pre define URL. Can any one give me some guides on this please.


Create a browser only session (Ubuntu)

I was recently in a Virgin media shop and was interested to see that they had laptops running Ubuntu for customers to browse the web on. The setup itself was interesting and I'm wondering if anyone knows how to recreate it. The features were: Only running Firefox, no other panels or menus I tried running a terminal (`ctrl+alt+t`) but it gave a message saying the user didn't have permission to access the x server (or something similar) I realise to recreate this is a function of controlling both user privileges and session parameters but I'm not sure how I would go about it. Any ideas?


Debian based system, only one gui program, nothing else

I would like to make a debian system where you can only open one GUI program at boot, no other graphical interface, no minimize, or any X apart from that program, is there a way to do it on debian if possible, or any other custom distro? I just want to boot open the program and allow the user to only see and use that program.


How to setup Kiosk type functionality in Linux mint cinnamon?

I'm using Linux Mint Cinnamon. I want to setup the computer to act as a kiosk, where the user can only really interact with Firefox in full screen mode. What is the easiest way to lock the machine down? Does `dconf` or `gconf` work with Cinnamon? Should I just ditch Cinnamon for xfce, or some other WM with built in kiosk mode?


Can i run a program on Linux startup instead of a Desktop Manager like Gnome, KDE, etc.?

I have a rasberry pi running raspbian and i would like it to "boot" into my program instead of starting Lxde. So basically let's say i will write a OpenGL program that will go fullscreen and i would display stuff on it. How could i configure raspbian (which is basically debian - but info for any linux would do as i will be able to figure it out how to adjust this to raspbian) so that on boot it will just start my program that will display stuff on the monitor?


Discard stdout of a command for t seconds

I am working on some batch scripts involving the following:   * Run some non-terminating sub-processes (asynchronously)   * Wait for **_t_** seconds   * Perform other task **X** for some time   * Terminate subprocesses Ideally, I would like to be able to differentiate the stdout of the sub- processes which has been emitted _before_ **X** from that which has been emitted _after_ **X**. A few ideas come to mind, although I have no idea as to how I would implement them:   * Discard stdout for **t** seconds   * Insert some text (for instance, 'Task X started') to visually separate the sections   * Split stdout into various output streams


CentOS 6.3 (kernel 2.6.32-279) & wl-kmod won't compile

I have been trying (unsuccessfully) to compile a Broadcom driver for use on my CentOS laptop. Previously, I had used the instructions located here to compile and it worked flawlessly. Now, I cannot get the driver to compile. Admittedly the errors look like something I should be able to simply fix, however, I have not found a way to get it to work for me yet. Here is what I get when I run the rpmbuild on my laptop:               $rpmbuild --rebuild --target=`uname -m` wl-kmod-5_100_82_112-3.el6.elrepo.nosrc.rpm      Installing wl-kmod-5_100_82_112-3.el6.elrepo.nosrc.rpm     warning: InstallSourcePackage at: psm.c:244: Header V4 DSA/SHA1 Signature, key ID baadae52: NOKEY     warning: user ajb does not exist - using root     warning: group ajb does not exist - using root     warning: user ajb does not exist - using root     warning: group ajb does not exist - using root     warning: user ajb does not exist - using root     warning: group ajb does not exist - using root     Building target platforms: i686     Building for target i686     Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.BX2aRY     + umask 022     + cd /home/jblair/rpmbuild/BUILD     + LANG=C     + export LANG     + unset DISPLAY     + cd /home/jblair/rpmbuild/BUILD     + rm -rf wl-kmod-5_100_82_112     + /bin/mkdir -p wl-kmod-5_100_82_112     + cd wl-kmod-5_100_82_112     + /bin/chmod -Rf a+rX,u+w,g-w,o-w .     + cd /home/jblair/rpmbuild/BUILD     + cd wl-kmod-5_100_82_112     + /usr/bin/gzip -dc /home/jblair/rpmbuild/SOURCES/hybrid-portsrc_x86_32-v5_100_82_112.tar.gz     + /bin/tar -xf -     + STATUS=0     + '[' 0 -ne 0 ']'     + /bin/chmod -Rf a+rX,u+w,g-w,o-w .     + /bin/sed -i 's/\/lib\/modules\/`uname -r`\/build/\"\${KSRC}\"/' Makefile     + echo 'override wl * weak-updates/wl'     + /bin/cat     + /bin/cat     + exit 0     Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.T8r6eV     + umask 022     + cd /home/jblair/rpmbuild/BUILD     + cd wl-kmod-5_100_82_112     + LANG=C     + export LANG     + unset DISPLAY     ++ uname -r     + /usr/bin/make KSRC=/usr/src/kernels/2.6.32-279.1.1.el6.i686     KBUILD_NOPEDANTIC=1 make -C "/usr/src/kernels/2.6.32-279.1.1.el6.i686" M=`pwd`     make[1]: Entering directory `/usr/src/kernels/2.6.32-279.1.1.el6.i686'     CFG80211 API is prefered for this kernel version     Using CFG80211 API       LD      /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/built-in.o       CC [M]  /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/shared/linux_osl.o       CC [M]  /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_linux.o       CC [M]  /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_iw.o       CC [M]  /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.o     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:64: warning: 'enum tx_power_setting' declared inside parameter list     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:64: warning: its scope is only this definition or declaration, which is probably not what you want     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1110: warning: 'enum tx_power_setting' declared inside parameter list     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1110: error: parameter 2 ('type') has incomplete type     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c: In function 'wl_cfg80211_set_tx_power':     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1123: error: 'TX_POWER_AUTOMATIC' undeclared (first use in this function)     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1123: error: (Each undeclared identifier is reported only once     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1123: error: for each function it appears in.)     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1125: error: 'TX_POWER_LIMITED' undeclared (first use in this function)     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1131: error: 'TX_POWER_FIXED' undeclared (first use in this function)     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c: At top level:     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1649: warning: initialization from incompatible pointer type     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1651: warning: initialization from incompatible pointer type     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1652: warning: initialization from incompatible pointer type     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1653: warning: initialization from incompatible pointer type     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1654: warning: initialization from incompatible pointer type     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1658: warning: initialization from incompatible pointer type     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c: In function 'wl_inform_single_bss':     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:1817: error: too few arguments to function 'ieee80211_channel_to_frequency'     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c: In function 'wl_bss_roaming_done':     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:2117: warning: passing argument 2 of 'cfg80211_roamed' from incompatible pointer type     include/net/cfg80211.h:3035: note: expected 'struct ieee80211_channel *' but argument is of type 'u8 *'     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:2117: warning: passing argument 4 of 'cfg80211_roamed' makes pointer from integer without a cast     include/net/cfg80211.h:3035: note: expected 'const u8 *' but argument is of type 's32'     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:2117: warning: passing argument 5 of 'cfg80211_roamed' makes integer from pointer without a cast     include/net/cfg80211.h:3035: note: expected 'size_t' but argument is of type 'u8 *'     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:2117: warning: passing argument 6 of 'cfg80211_roamed' makes pointer from integer without a cast     include/net/cfg80211.h:3035: note: expected 'const u8 *' but argument is of type 's32'     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:2117: error: too few arguments to function 'cfg80211_roamed'     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c: In function 'wl_bss_connect_done':     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:2149: warning: passing argument 2 of 'cfg80211_roamed' from incompatible pointer type     include/net/cfg80211.h:3035: note: expected 'struct ieee80211_channel *' but argument is of type 'u8 *'     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:2149: warning: passing argument 4 of 'cfg80211_roamed' makes pointer from integer without a cast     include/net/cfg80211.h:3035: note: expected 'const u8 *' but argument is of type 's32'     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:2149: warning: passing argument 5 of 'cfg80211_roamed' makes integer from pointer without a cast     include/net/cfg80211.h:3035: note: expected 'size_t' but argument is of type 'u8 *'     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:2149: warning: passing argument 6 of 'cfg80211_roamed' makes pointer from integer without a cast     include/net/cfg80211.h:3035: note: expected 'const u8 *' but argument is of type 's32'     /home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.c:2149: error: too few arguments to function 'cfg80211_roamed'     make[2]: *** [/home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112/src/wl/sys/wl_cfg80211.o] Error 1     make[1]: *** [_module_/home/jblair/rpmbuild/BUILD/wl-kmod-5_100_82_112] Error 2     make[1]: Leaving directory `/usr/src/kernels/2.6.32-279.1.1.el6.i686'     make: *** [all] Error 2     error: Bad exit status from /var/tmp/rpm-tmp.T8r6eV (%build)               RPM build errors:         InstallSourcePackage at: psm.c:244: Header V4 DSA/SHA1 Signature, key ID baadae52: NOKEY         user ajb does not exist - using root         group ajb does not exist - using root         user ajb does not exist - using root         group ajb does not exist - using root         user ajb does not exist - using root         group ajb does not exist - using root         Bad exit status from /var/tmp/rpm-tmp.T8r6eV (%build)      Any help you can provide would be most appreciated. I will not have access to the box in question until this evening, but I should be able to answer most questions and will try any suggestions I receive as soon as I return from work tonight.


How do I install Ubuntu/Mint on top of Debian?

I have a basic dual setup with Linux Debian and Windows 7 (Grub is my bootloader). However, since this machine will be donated to a friend that does not know a lot about computers, I would like to install a more user friendly Linux distro. I suspect that if I try to install on top of Debian, the bootloader will be overwritten and hell will break loose. Any ideas on how to **properly and safely** install the new distribution? Maybe resize a partition, format it, install the new distro and then delete the Debian partition?


Book on Linux OS design?

What is a good book about why linux has been designed the way it has? Such as why are HDs in `/dev/sda`, why `/dev/` null, zero, urandom and such are files (or pipes). Why do we have loopback device (I see 0-7 and control on my linux distro), why we have bin, sbin, lib and usr (and the difference between them). Everything about `/proc`. What is inside of the kernel and what isn't? From my memory init.d isn't part of the kernel and I was unsure how an program would be executed and know when to run these. What are block and character device represented as files? and why couldn't a character device be a '1 byte' (or int) block device? I have no idea why everything is a file (including sockets) and what happens when I write `cat /proc/cpuinfo`. Is that a named pipe to the OS which reads the CPU info on the fly and generate that text each time I call it?


Finding information on obscure libraries

Is there a website that organizes and explains all the various libraries that are available to use when developing on Linux? I have, from time to time, come across some very interesting and extremely specialized libraries. I also constantly find myself wondering what a particular `lib` file is when I am browsing my package manager or even digging through `/usr/lib`.


Why does SSH have unsecure defaults?

Why does SSH come with such an unsecure default configuration? to name what I consider unsecure defaults:   * root login enabled on SSH    * SSH protocol version 1 (which is vulnerable to MIM attacks) allowed  There also is no built in mechanism to handle brute forceattacks I can understand that interoperability and compatibility are important for a new system, but putting a server on the web with these defaults is a major security concern. If someone didn't know about these configuration options, they could put a server live that is very vulnerable to being bruteforced and be ignorant of the problem long enough for someone to gain access. The idea of bruteforcing root on SSH has been around a long time, and there is an ever-present 'background noise' of root login attempts on any server from bots and the like. It would make sense to ship SSH with some defaults that would help mitigate this threat. What is the reason for these unsecure defaults?


No package * available. cannot install git through yum

I am trying to install git on my Red Hat Enterprise Linux 6.5 server and have hit a brick wall. I can't find the package dependencies for git using yum.                   [root@FOOBAR mydir]# yum install curl-devel expat-devel gettext-devel \         >   openssl-devel zlib-devel         Loaded plugins: product-id, refresh-packagekit, security, subscription-manager         This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.         Setting up Install Process         No package curl-devel available.         No package expat-devel available.         No package gettext-devel available.         No package openssl-devel available.         No package zlib-devel available.         Error: Nothing to do      After reading a few forum posts, I found the EPEL package here, and installed it:                   [root@FOOBAR mydir]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm         Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm         warning: /var/tmp/rpm-tmp.IlnMHM: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY         Preparing...                ########################################### [100%]            1:epel-release           ########################################### [100%]      however even after this i still get the same error. can someone please help me out? **UPDATE:** The output of `yum repolist`:               [root@FOOBAR ~]# yum repolist     Loaded plugins: product-id, refresh-packagekit, security, subscription-manager     This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.     repo id          repo name                                                status     epel             Extra Packages for Enterprise Linux 6 - x86_64           10,657     repolist: 10,657      **UPDATE2:** I changed the `/i386/` to `/x86_64/` because i erased the i386 one and replaced it with epel 64 bit repo.


Iterate over n files?

I've got something fairly simple I want to do. I want to use `montage` on a directory that contains thousands of images, with very few options, namely:               me@home$ montage -size 256x256 DSC01*.JPG.svg output.png      ...but that's just not good enough, as it only grabs about 100 images at a time; neither is               me@home$ montage -size 256x256 *.svg output.png      ...which grabs all of the images at the same time, as the resulting file is too big to parse. What I _want to do_ is to iterate over something like 100-200 files at a time. I guess this could be implemented using a for loop (?), but I'm just a bit confused about how to do that. I guess there's probably a clever way to use `find -exec` or `xargs` that I'm not thinking of. I'm using `bash`, but I use `zsh` occasionally. _So, in conclusion, I'm looking for a one liner that, given 2600 image files, calls montage about 13 or 26 times (once for each 100-200 files), and given n files, can be called a multiple of n times._


Can't get past EFI to install RHEL on HP Itanium Server

When I am trying to install RHEL (6.3, 5.8, 4.8) on an HP Integrity Server rx2660 Itanium with 4GB RAM, I keep getting to the same point which is               Loading file efi\boot\initrd.img...done      After that nothing happens and I can’t continue installing RHEL. Also, when I hit `Ctrl`+`Alt`+`F3`, I see the message               Unable to identify CD-ROM format     unable to load NLS charset utf8      and the SCSI CDROM fails to mount a CD/DVD.


Skype doesn't work with webcam A4Tech PK-130MG

I've just installed Mint 12 on a desktop previously running Windows Vista. Despite using Ubuntu and Kubuntu on other machines, i still see myself as a beginner on GNU/Linux. On this Mint 12 machine, I can't make Skype, nor GTalk, nor any msn protocol client recognize the webcam, which is a A4Tech PK-130MG. I tried to install Ekiga, but the screen freezes at the first instant when the webcam is started. Only Camorama was able to properly capture the image from webcam. Nor Cheese, nor kamoso work. When anyone of them is started, the webcam image is showed for only an instant, after which the program crashes. I've already tried, without sucess, the procedure described at http://community.linuxmint.com/tutorial/view/219 As nothing worked till now, i'm here asking for help. Thanks.


dmesg message repeat

I keep getting this message repeated in `dmesg`:               [215259.269481] [UFW BLOCK] IN=eth0 OUT=     MAC=01:00:5e:00:00:01:00:26:f2:46:24:8e:08:00      SRC=192.168.1.1 DST=224.0.0.1 LEN=36  TOS=0x00 PREC=0x00      TTL=1 ID=1711 DF PROTO=2          [215270.008461] CPU2: Core temperature above threshold,      cpu clock throttled (total events = 2376639)      Any idea why?


"Could not get updates: Failed to process request."

I get this error on Debian Wheezy when I try to install automatic updates:               Could not get updates     Failed to process request.     More details      E: Error http://security.debian.org/ wheezy/updates/main iceweasel-l10n-en-gb all 1:24.7.0esr-1~deb7u1           404  Not Found [IP: 212.211.132.32 80]      I have now done what the top response here says: "Software update" appears empty in Debian, but there are upgrades available and then did `apt-get update && apt-get -u dist-upgrade`. It started doing updates, then I got the error message: > >     Could not get updates >     Failed to process request >     More details >     Operation was cancelled Yet it still appears to be doing the updates I don't really know what I'm doing very will with Linux so I feel hesitant to just be bashing in a load of commands of which I don't really know the effects; I am in the process of studying the tutorial right now, but this update seems critical for security. I think it has actually worked now using the terminal way I described above, and I'm reading http://forums.debian.net/viewtopic.php?f=30&t=113186 to help me figure out the problem with the Software Update program. Edit: Now I can't hibernate, it tries to hibernate and then comes back with the 'Could not get updates Failed to process request.' error..


How to create a kernel source tree?

I am reading a book on creating drivers on Linux, I do not have too much experience with Linux, I have installed a quite a few distros before but I have always used windows as my main operating system. I know some `C`, but I am mainly a `C#` programmer. I wish to learn (for fun) driver programming, and hope it will teach me some things about Linux and help me "get into it". My first hurdle is to find a distro with a standard `2.6.x` kernel. I tried to find one but they are all past `3.x` now. Any one know of a suitable one for this kind of task? Also the book says I should get a standard kernel from `kernel.org` and build a source tree. I have no idea what that means, please if someone could generally explain the steps. This is the book: http://oreilly.com/openbook/linuxdrive3/book/


btrfs on SD card, what does "Btrfs detected SSD devices, enabling SSD mode" mean exactly?

I'm experimenting with using btrfs on my Debian Linux armhf system. The rfs is on a micro SD card. On bootup I get the message "Btrfs detected SSD devices, enabling SSD mode". What features does this SSD mode give me exactly?


Problem downloading Java JDK with WGET on Ubuntu

I'm attempting to install the Java JDK through the command line using `WGET` on ubuntu (no desktop). Here is the picture I took. The file that was downloaded was not the tar ball of the JDK: How can I download it via WGET? ![enter image description here](http://i.stack.imgur.com/yfCjR.jpg)


btrfs snapshots without subvolumes?

I'm starting to use btrfs. I want to be able to snapshot certain directories but do not want to create sub-volumes. Is this possible?


Any way in Bash to write to a file every X seconds without closing it?

The hardware watchdog on my system needs a `0` written to `/dev/watchdog` at less than 60 seconds interval or it will fire. The file handle must be kept open however or the watchdog is then disabled. E.g.               echo "0" > /dev/watchdog      does not work, as the file handle is closed after the echo is completed. Is there any way to setup a loop in bash that will write `0` periodically to `/dev/watchdog` but keep the file handle open?


How can I modify Slingscold source code to stop it exiting each time it launches an application?

I am on Ubuntu 14.04 platform. I downloaded Slingscold application launcher, here the sources http://sourceforge.net/projects/slingscold/files/?, `bzr branch lp:slingshot` and `ppa:noobslab/apps` I compiled and installed it. It's a very nice application, except a bothering side; It takes 15-20 seconds to load in my system and it exits itself after launching application, I have to restart and wait for it to load each time. I think it runs as intended but it is slow in that way. It's written in _vala_. Would anybody take a look at the source code and modify it to not exit the process, hide the dashboard upon launching application and when I click on slingscold icon bring dashboard foreground? EDIT: For more info about Slingscold check out this link http://www.noobslab.com/2014/06/slingscold-launcher-is-now-available.html


Interfacing with a custom camera in Linux on the beaglebone

I'm new to Linux development and need some pointers to help me get a camera (OV7670) working on a beaglebone running Debian. Using the camera capes as a guide, I've connected the camera to the GPMC pins on the beagleboard and the I2C pins. However I'm a bit stumped to what I need to do in software to get Linux to recognize it as a camera and be able to use it to read a frame from the GPMC. From the readings I've done, it seems like I need to load a kernel module. I found that there is a OV7670 C driver file in the kernel source. What kind of modifications (if any) would I need to do? I'm also open to any suggested readings and tutorials that would help me.


I tried a command `cp /vol/examples/tutorial/science.txt .` and I get the error -               cp: cannot stat `/vol/examples/tutorial/science.txt': No such file or directory      I don't understand why this is happening. I went to cygwin home folder and created the necessary folder structure and text file. I also checked the folder structure and names. Also, I go into `~/vol/examples/tutorial` and then do `cat science.txt` and I can read the document. Then why does the CP command not work ?


Make the DNS server update my host name

I have some sort of DNS server running on my router (running Asuswrt-Merlin, and I can run commands from another Linux computer by host name, i.e., `ping web-server`. However, when I change settings on my router, it reboots, and then referring to servers by name fails (although connecting by IP works fine). If I reboot the server (not the router), suddenly it works again, so presumably the server is sending some sort of command. What command is this? I'd like to run it manually with cron or something. If it matters, the server is running Ubuntu 13.10.


Where is the trash folder in FreeBSD / PCBSD?

I'd like to delete - undelete files using the shell in PCBSD. But... I don't know where the "trash" folder is. Can anyone tell me?


FreeBSD: Can't install Python 2.7

I can't seem to be able to install Python 2.7 on my FreeBSD system. Here is some info:               # portsnap update     Ports tree is already up to date.      Version:               # uname -r     7.1-RELEASE      Installation:               # cd /usr/ports/lang/python27/     # make     ===>  Found saved configuration for python27-2.7.5_1     => Python-2.7.5.tar.xz doesn't seem to exist in /usr/ports/distfiles/python.     => Attempting to fetch ftp://ftp.lv.freebsd.org/pub/FreeBSD/distfiles/python/Python-2.7.5.tar.xz     Python-2.7.5.tar.xz                           100% of    9 MB  159 kBps 00m00s     ===> Fetching all distfiles required by python27-2.7.5_1 for building     ===>  Extracting for python27-2.7.5_1     => SHA256 Checksum OK for python/Python-2.7.5.tar.xz.     ===>   python27-2.7.5_1 depends on file: /usr/local/bin/xz - found     tar: Unrecognized archive format: Inappropriate file type or format     tar: Error exit delayed from previous errors.     *** Error code 1          Stop in /usr/ports/lang/python27.     *** Error code 1          Stop in /usr/ports/lang/python27.      Any help is highly appreciated.


Horrible Iceweasel and Opera performance when watching youtube

I have 64-bit Debian on laptop with Intel Core 2 Duo T9300 2.5GHz, Nvidia Quadro NVS140M GPU and 4GB RAM. For now - im on vacation and im using 3G USB modem. I have relatively slow but high quality stable 80kB/s (640kb/s) connection and it is enough to watch youtube 360p without any problems under Windows 7 on same machine. Youtube player and other video services work perfect, response on my clicks is instant. I also tried to watch youtube on very old 900MHz PIII desktop with same USB modem - no problem at all. However - under Debian (Iceweasel or Opera) - **all video players seem to work very inefficient and most of them freeze my browser for few seconds**. Pause button has lag too. I noticed that my browsers load diffrent youtube player (it's not HTML5 player like under windows). I also tried to connect my laptop via ethernet to windows computer with shared internet (from same USB modem), so this is not USB modem driver fault. My GPU is installed correctly and it seem to work with high performance.It deals with modern Gnome with fancy animations without performance problems, but I'm using Gnome Classic because modern one is too buggy when I run OpenGL app in windowed mode. **What can I do to improve youtube performance?** Im really confused that interned browsing on my relatively fast laptop works slower than old 900MHz PIII desktop with Windows XP.


Extract part of the first line of a file

I am trying to configure some external commands in Gedit3, for compiling LaTeX files. All works well, except for the following. I have a LaTeX document, consisting of many parts. Each file begins with               % mainfile: name_of_main_file.tex      So in bash I'm trying to extract the first line of each file, and from that line extract `name_of_main_file.tex` and compile that. So the question is: what is the quickest way of extracting `name_of_main_file.tex`, loading it into a variable, say `$MAINFILE`, so that then I can compile that?


Find and rename files adding part of the path to filename

I have a folder with two level of subfolders inside it. Inside the second subfolder, there is a jpg file. All the jpg have the same name: `cover.jpg` Example:               /home/user/folder001/folderAAA/cover.jpg     /home/user/folder002/folderBBB/cover.jpg     [...]     /home/user/folder999/folderZZZ/cover.jpg      I need to find (and copy to a new folder) all `cover.jpg` files and rename them adding to its filename (as prefix) the name of the first and second subfolder. Example:   After the intended operation, the content ot `/home/user1/newfolder` must be:               folder001_folderAAA_cover.jpg     folder002_folderBBB_cover.jpg     [...]     folder999_folderZZZ_cover.jpg


Failed Gummiboot install

I installed `Arch-Linux` and probably messed up with Gummiboot config. Is there a way to change `/boot/loader/entries/arch.conf` without doing whole installation process again?


DNS server design

Currently my company is deploying SIP phones in different locations from different boroughs. I've been asked to create static DNS records for each of the phones with the following format:   `phone-number.location.borough.sip.my-domain.com`. So far I have deployed two sites which belong to the same zone (db.sipphones). If I continue with this design I will have an immense zone which I believed is not optimal. An alternative would be to create a zone per location. I was wondering if anybody can advise the best design for this scenario.


Command to measure TLB misses on LINUX?

Could some one direct me to a command to measure TLB misses on LINUX, please? Is it okay to consider (or approximate) minor page faults as TLB misses?


Getopts option processing, Is it possible to add a non hyphenated [FILE]?

I'm using `getopts` for all of my scripts that require advanced option parsing, and It's worked great with `dash`. I'm familiar with the standard basic `getopts` usage, consisting of `[-x]` and `[-x OPTION]`. Is it possible to parse options like this?                dash_script.sh FILE -x -z -o OPTION      ## Or the inverse?      dash_script.sh -x -z -o OPTION FILE


Shell Script mktemp, what's the best method to create temporary named pipe?

I'm aware its best to create temporary files with `mktemp`, but what about named pipes? I have an idea, I'm sure it would work, but I would really like an expert opinion. I prefer things to be as POSIX compliant as possible, but Linux only is acceptable. Avoiding Bashisms is my only hard criteria, as I write in `dash`.


Extract Value from HTML

I had another question based on a different html format. Problem is that my smartmeter is extremely slow in loading these HTMLs (5secs per file). Now I found another way with different html file....which is very fast in loading... Can you please give me a helping hand in how I could extract the two values for positive electric power Pplus and negative electric power Pminus...in this html file.... HTML is quite large but has this specific code arround the two values 21.0000 for Pplus and 5.0000 for Pminus.               ...     ...

     21.000

               ....     ....

     5.00000

           Thanks a lot. Norbert


What does fsck -p (preen) do on ext4?

I was reading a blog post about filesystem repair and the author posted a good question… `fsck -p` is supposed to fix minor errors automatically without human intervention. But what exactly will it fix when it's told to preen the filesystem? What errors will it fix, and what will cause it to stop and tell the user he or she must run fsck interactively? Is there a list of some kind? I've been Googling around and all I find is the man page, which doesn't really tell what `-p` will fix or what triggers the hands-on flag. I'm specifically interested in the ext4 filesystem.


Interpret an interpolated variable as a literal string in Perl regex

I am using `perl` to colorize a matched string               MATCH=aaa     printf "aaa\n/dev/aaa\nccc\n" | perl -pe "s/($MATCH)/\e[1;31m\1\e[0m/g"      This works well until I try to match a string containing special characters, e.g.               MATCH=/dev/     printf "aaa\n/dev/aaa\nccc\n" | perl -pe "s/($MATCH)/\e[1;31m\1\e[0m/g"      The reason is, when `bash` substitutes `$MATCH`, perl gets the following expression:               perl -pe "s/(/dev/)/\e[1;31m\1\e[0m/g"      I would need to backslash those `/` to make it work, i.e.               MATCH=\/dev\/     printf "aaa\n/dev/aaa\nccc\n" | perl -pe "s/($MATCH)/\e[1;31m\1\e[0m/g"          But I don't know what `MATCH` will contain. It could be anything, `+` or `(`. Is there a way to tell `perl` to treat the characters literally, not as an expression? # UPDATE: Using solution suggested by `Joseph R.` gives following error:               MATCH=/dev/     printf "aaa\n/dev/aaa\nccc\n" | perl -pe "s/\Q($MATCH)\E/\e[1;31m\1\e[0m/g"     Backslash found where operator expected at -e line 1, near ")\"     (Missing operator before \?)     Having no space between pattern and following word is deprecated at -e line 1.     syntax error at -e line 1, near "s/\Q(/dev/)"     Search pattern not terminated at -e line 1.      # UPDATE2: now I don't get any error, but there seems to be no match (there is no coloring):               # MATCH=/dev/ ; printf "aaa\n/dev/aaa\nccc\n" | perl -pe 's/(\Q$ENV{MATCH}\E)/\e[1;31m\1\e[0m/g'     aaa     /dev/aaa     ccc


Searching history forward after backward?

In bash, when I hit `Ctrl``r`, I can search the command history backward. If I would like to search forward again, what shall I do? I hit `Ctrl``s`, but it doesn't work. My bash is GNU bash, version 4.2.25(1)-release (i686-pc-linux-gnu)


Error during linux deepin installation

Yesterday i downloaded linux deepin latest version from linuxdeepin.com and create a bootable DVD disk for install that, But i get this error message during the installation(after selecting language):               nouveau E[Xorg[1925]] failed to idle channel 0xCCC0001      Please see the images below: ![enter image description here](http://i.stack.imgur.com/pNfFB.jpg) After that, a screen shown like this: ![enter image description here](http://i.stack.imgur.com/2AOrt.jpg) Please note that I installed deepin in VMware from my bootable DVD (no problem here).


Need advice in choosing a tiling WM

I've used GNOME's default window manager for some years, but now I want to try a tiling window manager. I want it to satisfy these two criteria:   1. WM must be lightweight   2. WM should not be complicated to configure


Easily updatable troubleshooting LiveUSB distro

I need easily updatable troubleshooting LiveUSB distro. By troubleshooting I mean that it should not have nothing fancy (X is used o display gparted etc.) but should have access to file archivers/undeleting etc. tools. Unfortunately most LiveUSB distros are modified LiveCD ones so they assume sequential and slow base device (as opposed to USB flash disk which is fast compared to CD, have 0 latency and have much number of writes to it). The only method of updating is overwriting the previous content. I'd like to have 'easy' package manager on distro to allow installing tools I need and from time to time an update which would not destroy any customisation. On the other hand I still would like to have autodetection scripts etc.


How to back up initial state of external backup drive?

I've picked up an HP Simplesave external drive. It comes with some fancy software that is of no use to me because I don't use Windows. Like many current consumer-targeted backup drives, the backup software is actually contained on the drive itself. I'd like to save the drive's initial state so that I can restore it if I decide to sell it. The backup box itself is somewhat customized: in addition to the hard drive device, it presents a CDROM-like device on `/dev/sr0`. I gather that the purpose of this cdrom device is to bootstrap via Windows autoplay the backup application which lives on the disk itself. I wouldn't suppose any guarantees about how it does this, so it seems important to preserve the exact state of the disk. The drive is formatted with a single 500GB NTFS partition. My initial thought was to use `dd` to dump the disk (`/dev/sdb`) itself, but this proved impractical, as the resulting file was not sparse. This seemed to be because the NTFS empty space is not filled with zeroes, but with a repeating series of 16 bytes. I tried gzipping the output of `dd`. This reduced to the file to a manageable size — the first 18GB was compressed to 81MB, versus 47MB to tarball the contents of the mounted filesystem — but it was very slow on my admittedly somewhat derelict Pentium M processor. The time to do that first 18GB was about 30 minutes. So I've resorted to dumping the disk state and partition data separately.   * I've dumped the partition state with              sfdisk -d /dev/sdb > sfdisk.-d.out        * I've also created a compressed image of the NTFS partition (the only one on the disk) with              ntfsclone --save-image --output - /dev/sdb1 | gzip -c > ntfsclone.img.gz      Is there anything else I should do to ensure that I can restore the precise original state of the drive?


Sending input to a screen session from outside

My scenario is this: I have a screen session running in a remote location. Inside this screen is a consoled-based program. When run without screen, this program starts in the terminal and accepts commands on its standard input. What I want is a way to remotely send a command to screen so that this command is received by the console program. Maybe like this: My PC -> SSH Send Msg Auto -> Screen Session -> Program (Run command received) So from a remote PC I can send via SSH commands to the screen which sends them to the program. The program accepts them and executes them.


What directories do I need to back up?

What are the directories one should back up, in order to have a backup of all user-generated files? From a vanilla debian install, I can do enough apt to get the packages that I want. So if I don't want to backup the entire system, where all in the filesystem do user-generated configuration and data files reside?


How can I kill a particular thread of a process?

$ ps -e -T | grep myp | grep -v grep       797   797 ?        00:00:00 myp       797   798 ?        00:00:00 myp       797   799 ?        00:00:00 myp       797   800 ?        00:00:00 myp      This shows the process `myp` with PID = 797 and four threads with different SPIDs. How can I kill a particular thread of the process without killing the whole process. I understand that it might not be possible at all in some cases when there are fatal dependencies on that particular thread. But, is it possible in any case? Is yes, how? I tried `kill 799` and the process itself was terminated. Now I am not sure this was because there were dependencies that made `myp` fail without the process `800` or because kill is simple not able to kill individual processes.


SSH'd into a computer, uptime / who / users report 0 users?

I'm ssh'd into a server. Why doesn't the server report it?               # uptime     21:54:28 up 13 days,  3:47,  0 users,  load average: 1.18, 1.11, 1.13     # users     # who      I'm not really sure I understand it correctly, but shouldn't they list 1 user, since I'm obviously logged in (as root)? Why it doesn't acknowledge me?


How to create virtual serial port?

Is there a common way (tool?) to create two serial ports through physical /dev/ttyS0? I have to simultaneously use both to communicate. I've seen 'Socat' but I can't understand how can I use it just for my purpose. If nothing 'ready-to-use' exists, I can develop in C++ by myself (worst case): can someone direct me on that libraries use for this purpose, general approach, risks and other useful things to know?


how to uniformly execute benchmarks on linux

I am doing project on adapting Linux for scalable multi core architecture. I am testing Linux's performance with benchmarks. When I am running the benchmarks in the system then other programs like background processes were running in the system. I think system load due to background processes is not fixed, as a result execution time of benchmarks may vary due to system's varying load. Then how to execute benchmarks uniformly. I already searched in net and asked researchers about it but not yet able to find solution of this problem. If possible please try to help me.


Linux: Total swap used = swap used by processes +?

So, I'm trying to do some investigation on where does swap use come from in a system with high swap usage:               # free                  total       used       free     shared    buffers     cached     Mem:        515324     508800       6524          0       4852      27576     -/+ buffers/cache:     476372      38952     Swap:       983032     503328     479704      Adding up swap used per process:               # for proc in /proc/*; do cat $proc/smaps 2>/dev/null | awk '/Swap/{swap+=$2}END{print swap "\t'`readlink $proc/exe`'"}'; done | sort -n | awk '{total+=$1}/[0-9]/;END{print total "\tTotal"}'     0       /bin/gawk     0       /bin/sort     0       /usr/bin/readlink     28      /sbin/xxxxxxxx     52      /sbin/mingetty     52      /sbin/mingetty     52      /sbin/mingetty     52      /sbin/mingetty     56      /sbin/mingetty     56      /sbin/mingetty     60      /xxxxxxxxxxx     60      /usr/sbin/xxx     84      /usr/sbin/xxx     108     /usr/bin/xxx     168     /bin/bash     220     /sbin/init     256     /sbin/rsyslogd     352     /bin/bash     356     /bin/bash     360     /usr/sbin/sshd     496     /usr/sbin/crond     672     /usr/sbin/sshd     12972   /opt/jdk1.6.0_22/bin/java     80392   /usr/libexec/mysqld     311876  /opt/jdk1.6.0_22/bin/java     408780  Total      Which gives a lower value for total used swap. Where is the remaining used swapspace? Is it vmalloc()'ed memory inside the kernel? Something else? How can I identify it? Output of meminfo:               # cat /proc/meminfo      MemTotal:       515324 kB     MemFree:          6696 kB     Buffers:          5084 kB     Cached:          28056 kB     SwapCached:     157512 kB     Active:         429372 kB     Inactive:        65068 kB     HighTotal:           0 kB     HighFree:            0 kB     LowTotal:       515324 kB     LowFree:          6696 kB     SwapTotal:      983032 kB     SwapFree:       478712 kB     Dirty:             100 kB     Writeback:           0 kB     AnonPages:      399456 kB     Mapped:           8792 kB     Slab:             7744 kB     PageTables:       1820 kB     NFS_Unstable:        0 kB     Bounce:              0 kB     CommitLimit:   1240692 kB     Committed_AS:  1743904 kB     VmallocTotal:   507896 kB     VmallocUsed:      3088 kB     VmallocChunk:   504288 kB     HugePages_Total:     0     HugePages_Free:      0     HugePages_Rsvd:      0     Hugepagesize:     4096 kB


perform ping test to change dns

I wrote this script to check if my dns server works fine or not, and if not change it. but it gives out error `./dns-ping.sh: line 15: ((: 3 < : syntax error: operand expected (error token is "< ")` where is the problem?               #! /bin/bash          loss_count=0     echo "--------------------------------------------------------------"     echo "++ DNS Ping Tester ++"     echo "--------------------------------------------------------------"     echo "please enter threshold:"     read $threshold     for timer in {1..2}         do             png=`ping -c 5 -q yahoo.com | grep -oP '\d+(?=% packet loss)'`             let loss_count=$png+$loss_count     done     let loss_mid=loss_count/12     if (($loss_mid < $threshold)); then     #   ifdown eth0         echo "less"     else         echo "nameserver 8.8.8.8" > /etc/resolv.conf     fi


How /var/lib/dpkg/lock works?

/var/lib/dpkg/lock is file that holding a lock when "A package manager is working". But how this system works? I have /var/lib/dpkg/lock everytime when I have Linux working. When I use one of package manager for dpkg I have it without any change. So I can't see it in action.


Listing both ls information and mount points of a directory?

On my Ubuntu Natty, typically all new drives inserted (e.g. USB Flash thumbdrives) are mounted under `/media`. So, on my system, I can do something like this:               $ mount | grep '/media'     /dev/sda6 on /media/disk1 type ext4 (rw,uhelper=hal,commit=0)     /dev/sda9 on /media/disk2 type ext4 (rw,nosuid,nodev,uhelper=udisks,commit=0)          # create proper dir     $ sudo mkdir /media/properdir     # creat symlink     $ sudo ln -s /tmp /media/          $ ls -la /media/     total 24     drwxr-xr-x  6 root          root          4096 2013-04-08 16:35 .     drwxr-xr-x 22 root          root          4096 2013-03-23 21:44 ..     drwxr-xr-x 36 username      username      4096 2013-04-06 19:15 disk2     drwxr-xr-x 11 username      username      4096 2012-04-10 12:24 disk1     drwxr-xr-x  2 root          root          4096 2013-04-08 16:35 properdir     lrwxrwxrwx  1 root          root             4 2013-04-08 16:35 tmp -> /tmp      ... that is, `ls` doesn't distinguish between a "proper" directory, and a mount point for a drive. What I'd like to have, is a tool output possible mount points as well, similar to how a symlink is shown by `ls`; example:               $ lsMOUNT -la /media/     total 24     drwxr-xr-x  6 root          root          4096 2013-04-08 16:35 .     drwxr-xr-x 22 root          root          4096 2013-03-23 21:44 ..     drwxr-xr-x 36 username      username      4096 2013-04-06 19:15 disk2 => /dev/sda9     drwxr-xr-x 11 username      username      4096 2012-04-10 12:24 disk1 => /dev/sda6     drwxr-xr-x  2 root          root          4096 2013-04-08 16:35 properdir     lrwxrwxrwx  1 root          root             4 2013-04-08 16:35 tmp -> /tmp      Does the proper `ls` have an option for something like this? If not, are there tools that can accept the same command line arguments as `ls`, but resolve potential mount points?


rsync: error starting client-server protocol

I have rsyncd running on both the systems . When I am trying to check the connection it giving me following error: **From host2:**               user@host2#rsync username@host1::share     password: [password]           @ERROR: auth failed on module share     rsync error: error starting client-server protocol (code 5) at main.c(1524) [Receiver=3.0.7]      **On host1:** I have following configuration               vim /etc/rsyncd.conf          max connections = 2     log file = /var/log/rsync.log     timeout = 300          [share]     comment = Public Share     path = /home/subhransu     read only = no     list = yes     uid = backuppc     gid = backuppc     auth users = backuppc     secrets file = /etc/rsyncd.secrets      **On host1**               tail /var/log/rsync.log          2013/04/09 03:47:15 [29179] forward name lookup for cust-198-154-126-179.corexchange.com failed: No address associated with hostname     2013/04/09 03:47:15 [29179] connect from UNKNOWN (198.154.126.179)     2013/04/09 03:47:18 [29179] auth failed on module share from unknown (198.154.126.179): unauthorized user      Note: `rsyncd.secrets` has correct `user:passwd` , No firewall issue.


Optimizing a shell script with long running while loop

I have written a shell script which has to do the following:   1. Capture session commands into one file.   2. Every individual command into separate file.   3. Mail every individual command file content based on certain criteria. As for my observation, the loop has to iterate minimum of 25,000 times. Now my problem is that it is taking more than 6 hours to complete all iterations. Below is the main part of the script which is taking long time to process.                if [ -s "$LOC/check.txt" ]; then              while read line; do                 echo -e " started processing $line at `date` " >> "$SCRIPT_LOC/running_status.txt"                 TST=`grep -w $line $PERM_LOC/id_processing.txt`                 USER=`echo $TST | grep -w $line | awk -F '"' '{print $10}'`                 HOST=`echo $TST | grep -w $line | awk -F '"' '{print $18}'`                 ID=`echo $TST | echo $line | tr -d '\"'`                 IP=`echo $TST | grep -w $line | awk -F '"' '{print $20}'`                 DB=`echo $TST | grep -w $line | awk -F '"' '{print $22}'`                 CONN_TSMP=`echo $TST | grep -w $line | awk -F '"' '{print $2}'`                      if [ -z "$IP" ]; then                         IP=`echo "$HOST"`                 fi                      if [ "$USER" == "root" ] && [ -z $DB ]; then                          TARGET=/data1/sessions/root_sec                          CMD_TARGET=/data1/commands/root_commands                          FILE=`echo "$ID-$CONN_TSMP-$USER@$IP.txt"`                 else                          TARGET=/data1/sessions/user_sec                          CMD_TARGET=/data1/commands/user_commands                          FILE=`echo "$ID-$CONN_TSMP-$USER@$IP.txt"`                 fi                      ls $TARGET/$FILE                 If [ $? -ne 0 ]; then                          echo $TST | awk -F 'STATUS="0"' '{print $2}'| sed "s/[</>]//g" >> "$TARGET/$FILE"                          echo -e "\n" >> "$TARGET/$FILE"                  fi                       grep $line  $LOC/out.txt  > "$LOC/temp.txt"                       while read val; do                           TSMP=`echo "$val" | awk -F '"' '{print $2}'`                           QUERY=`echo "$val" | awk -F 'SQLTEXT=' '{print $2}' | sed "s/[/]//g"`                            echo " TIMESTAMP=$TSMP " >> "$TARGET/$FILE"                            echo " QUERY=$QUERY " >> "$TARGET/$FILE"                            RES=`echo "$QUERY" | awk {'print $1'} | sed 's/["]//g' `                            TEXT=`grep "$RES" "$PERM_LOC/commands.txt"`                            if [ -n "$TEXT" ]; then                                    NUM=`expr $NUM + 1`                                    SUB_FILE=`echo "$ID-$command-$NUM-$TSMP-$USER@$IP.txt"`                                    echo -e "===============\n" > "$CMD_TARGET/$SUB_FILE"                                    echo "FILE      =   \"$SUB_FILE\"" >> "$CMD_TARGET/$SUB_FILE"                                     ### same way append 6 more lines to $SUB_FILE                                                      SUB=`echo "$WARN_ME" | grep "$command"`                                     if [ "$command" == "$VC" ]; then                                           STATE=`echo " very critical "`                                     elif [ -z "$SUB" ]; then                                           STATE=CRITICAL                                     else                                            STATE=WARNING                                     fi                                          if [ "$USER" != "root" -a "$command" != "$VC" ]; then                                            mail command &                                     elif [ "$USER" == "root" -a -z "$HOST" ]; then                                            mail command &                                     elif [ "$USER" == "root" -a "$command" == "$VC" ]; then                                            mail command &                                     else                                            echo -e "some message \n" >> $LOC/operations.txt                                     fi                            fi                  done < "$LOC/temp.txt"         done < "$LOC/check.txt"      fi      Can any one help me how to optimize this code either by dividing or by changing logic or by using functions or by anything else? Here I have to use a shell script only and the server on which the script will be executed should not take more than 3GB of RAM to process it. Any help is very very useful.


Can I get the opposite of `diff -q` -- matching identical files without printing their contents

I have a number of files in a directory, and I want to check that they are all unique. For simplicity, let's say I have three files: `foo.txt`, `bar.txt` and `baz.txt`. If I run this loop, I will check them all against each other:               $ for f in ./*; do for i in ./*; do diff -q "$f" "$i"; done; done     Files bar.txt and baz.txt differ     Files bar.txt and foo.txt differ     Files baz.txt and bar.txt differ     Files baz.txt and foo.txt differ     Files foo.txt and bar.txt differ     Files foo.txt and baz.txt differ      For the hundreds of files I want to deal with, this would become pretty unreadable; it would be better to list the files that _do_ match, and then I can look over the list quickly and make sure that files are only matching themselves. From the manpage, I would have thought that the `-s` option would accomplish this:               $ for f in ./*; do for i in ./*; do diff -s "$f" "$i"; done; done     Files bar.txt and bar.txt are identical     Files baz.txt and baz.txt are identical     Files foo.txt and foo.txt are identical      ...however, in fact it _also_ prints out the whole contents of any files that differ. Is there any way to suppress this behaviour, so I only get the behaviour above? Alternatively, is there some other tool that can accomplish this?


Privileges for jenkins at apache's folder

I'm having issue similar to this: How to copy files as Jenkins "post build" action if i don't have privileges to destination directory I'm willing to move/copy/rsync files from jenkins workspace to > /var/www/app with rights setted to > apache: **apache** **I've added jenkins to group** **apache** , but the instance of jenkins cannot copy files to /var/www/app. I've also tried with setting privileges of /var/www/app to apache:jenkins but still, Jenkins keep spitting out error: Permission denied or Operation not permitted PS: Forgot to add OS is centOS ;) EDIT 1: This is log from jenkins script runnig: > [workspace] $ /bin/sh -xe /tmp/hudson1379987233097some_more_numbers.sh + sh > /path_to_sh_script/script.sh sending incremental file list > > application/ > > rsync: failed to set permissions on "/var/www/app/application": Operation > not permitted (1) And this is the script itself :) > #!/bin/bash > > rsync -avzh /path/to/jenkins/jobs/app/workspace/default/application > /var/www/app ; > > rsync -avzh /path/to/jenkins/jobs/app/workspace/default/library /var/www/app > ; > > rsync -avzh /path/to/jenkins/jobs/app/workspace/default/public /var/www/app > ;


py3compile error - Unable to get the locale encoding

After reinstalled the python3.2, I got the error as below when call `py3compile`:               Fatal Python error: Py_Initialize: Unable to get the locale encoding     LookupError: no codec search functions registered: can't find encoding     Aborted      I know it may be the problem of missing environment variable. But I have no idea of how to fix it. I checked the `env` output and didn't find any PYTHONXXX variables.


What does $# mean in shell?

What does `$#` mean in shell? I have code such as               if [ $# -eq 0 ]     then      I want to understand what `$#` means, but Google search is very bad for searching these kinds of things.


netcat throughput low but iperf high

I was testing the throughput between two pcs connected on the same router: one with 100mbps lan, the other with 54mbps wifi. I tested both `netcat` and `iperf` and the throughtput I get is only 2.6mb/s. What can be wrong? Shouldn't it be more?


Correlating filename with package

Say, I'm given a filename like `libasound.so.2`. Is there a way to query the package manager to correlate the filename with its corresponding package? I'm interested to get answers for any package manager, but my primary focus is on `apt` and `yum`.


SVN could not connect to server

Hi all i have got an issue while updating svn repository from my server. Please find the error below               SVN: OPTIONS of 'http://ipaddress/svn/folder': could not connect to server (http://ipaddress)      but i can to ping and connect SVN server via ssh. Please help to resolve this issue.


Setup Linux backup with Bacula and Webmin

Hi guys I'm having troubles finding a good documentation to setup an easy and possibly web oriented backup solution for one of our CentOS 5.4 file server. The things I need to accomplish are the following:   * find a solutions that runs possibly via web to make it easy to manage it   * find a solution that has a UI and is simple to manage   * backups are done from one linux box onto an other linux box on the same network (just different location)   * be able to understand if the BK worked out well and/or if any error happened The reason why I need this is because it's managed primarly from my business partner which is not a programmer although he's pretty good with things like Webmin and so on... Since he likes Webmin a lot I had a look at those two programs:   * Amanda   * Bacula but I might be open to different solutions. I have both of them installed but not running (including DB for Bacula) I lack directions there are a bunch of things that I don't understand first of all how to backup on the LAN disk... Have you guys ever found a good and simple guide / tutorial on this topic? Anything would be very appreciated.


How to copy a file from my home folder to /usr

I'm trying to copy a file from my homedir to /usr. How do I setup the permissions to allow this?               $ chmod 777 KeePass-2.14.zip     $ cp KeePass-2.14.zip /usr/keepass/     cp: cannot create regular file `/usr/keepass/KeePass-2.14.zip': Permission denied     $ sudo cp KeePass-2.14.zip /usr/keepass/     cp: cannot stat `KeePass-2.14.zip': Permission denied     $


VPN that gives me an internal IP and allows me to reach the internal network from outside

Using Red hat linux/CentOS. Where I have 1 Public IP, that is accessible remotely via SSH. Now that server needs to connect one VPN Server so that VPN server can give one IP to our Server. Now from our server we need to then ping local ip such as 10.x.x.10 which is located behind there VPN server. What VPN client do we use for such to achieve? What type of VPN client which allows to use such thing? There are IPSec host to host and network to network but confusing is what means what? Do I just use IPSec host to host or I need to do network to network? Another problem is if the VPN connection is made, how can I access my server remotely using SSH? Cause most of the time when VPN is connected then the public IP is not reachable anymore. Can anyone advise for my CentOS/RHEL what type of VPN client I need to install and configure? (very confusing I know what I need but I do not know there standard names to explain my other end point ICT team).


Gnome not starting in FreeBSD

I tried to install gnome2 in FreeBSD using the command `pkg_add -v -r gnome2`. I also edited my file in `/etc/rc.conf` and added the lines `gdm_enable="YES"` and `gnome_enable="YES"` and also added the lines in `/etc/fstab` `proc /proc procfs rw 0 0` . Still I typed startx in my prompt it gave me error for command not found. Please Help.


Citrix printing problem on centos - hp

I have setup Centos 6.3 - 6.5, installed wine and running Citrix app. I can print perfectly Wine based apps (i.e. wine notepad) but when printing Citrix through wine it is printing ASCII characters. I have installed hplip-3.14.3 printer is HP Lasetjet Pro 400 M401n. Do any one have any idea on same? Can some one guide on work around? Many thanks!


Getting output from vivopay-serial converter

First off, I am new to linux so please excuse my ignorance. I'm trying to read output from idtech's ViVOpay Vend III in linux. The device claims it interfaces with USB and RS-232. I currently have it plugged in via USB. I ran the following command and got the following output:               dmesg | grep tty     usb 5-2: vivopay-serial converter now attached to ttyUSB0      This tells me that linux knows about the connected device. Now I would like to actually get some output from the device. Other card readers that I've used will simply dump the card data much like a keyboard. If I swipe a card with a text editor open, it will show me that raw card data. This isn't the case with the Vend III. Could someone give me some insight into testing the device or let me know if their is some additional setup that I need to perform? Environment: Distribution ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release 12.04 Codename: precise Kernel: 3.2.0-59-generic Thanks!


How to configure a Fault Tolerance System in CentOS 6.0

I want to implement the fault tolerance in a CentOS environment. ## EDIT **Scenario:** Two different systems connected via network having CentOS 6.0. **What I want:** Now I want to setup Fault Tolerance in for both systems. So that even if one machine got any problem my running applications/servers never go down. I found kemari and RDMA tools to implement that in VMs. But I am newbie for this and don't know, from where I do start. I mean what to download, how to configure and how to run the VM by this? Also I didn't found any documentation for beginners. Please help who is having knowledge about either those technologies or any other technology to get my Fault Tolerance System. **If not in VMs, please give me some idea to implement this task only on two physical machines rather than virtually.**


Are there any recommended SELinux policies for JBOSS?

I’m looking for tips about defining JBoss policies in SELinux.   I saw that OWASP is planning to publish a document about this, but I need some guidance ASAP. Can someone please help?


How can a bash script detect if it is running in the background?

Is there way for a bash script to know if it is running in the foreground or background, and so it can behave slightly differently in each case?


Linux Debain Squeezy Distro: Weakerth4n, Kconfig && make issues

I am running the Weakerth4n linux operating system on my old dell d600 laptop I got at Defcon for $80 USD. Anyway I had a question about making certain programs (like Virtual Box) this may be as simple as telling me that my specific distro isn't supported but it's worth a shot and it could be that my Kbuild configuration is somehow messed up because when I was trying to install ndiswrapper I first got a Kbuild error from make and then this:               (/usr/src/ndiswrapper-1.59# make)     make -C utils     make[1]: Entering directory `/usr/src/ndiswrapper-1.59/utils'     make[1]: Nothing to be done for `all'.     make[1]: Leaving directory `/usr/src/ndiswrapper-1.59/utils'     make -C driver     make[1]: Entering directory `/usr/src/ndiswrapper-1.59/driver'     make -C /usr/src/linux-headers-3.7.10blue-ghost1.9 M=/usr/src/ndiswrapper-1.59/driver     make[2]: Entering directory `/usr/src/linux-headers-3.7.10blue-ghost1.9'     /usr/src/linux-headers-3.7.10blue-ghost1.9/arch/x86/Makefile_32.cpu:2: ***     missing separator.  Stop.     make[2]: Leaving directory `/usr/src/linux-headers-3.7.10blue-ghost1.9'     make[1]: *** [modules] Error 2     make[1]: Leaving directory `/usr/src/ndiswrapper-1.59/driver'     make: *** [driver] Error 2      So I downloaded the dependencies for VirtualBox as shown in this guide https://www.virtualbox.org/wiki/Linux%20build%20instructions but instead of getting source I just downloaded the .deb file and executed a dpkg -i ./.deb, and installed VirtualBox that way. Then I...               :VirtualBox     :WARNING: The vboxdrv kernel module is not loaded. Either there is no module          available for the current kernel (3.7.10blue-ghost1.9) or it failed to          load. Please recompile the kernel module and install it by                 sudo /etc/init.d/vboxdrv setup               You will not be able to start VMs until this problem is fixed.      < error > : So I run /etc/init.d/vboxdrv setup and get this                :Stopping VirtualBox kernel modules ...done.      Uninstalling old VirtualBox DKMS kernel modules ...done.      Trying to register the VirtualBox kernel modules using DKMS      Error! Bad return status for module build on kernel: 3.7.10blue-ghost1.9  (i686)      Consult the make.log in the build directory      /var/lib/dkms/vboxhost/4.3.8/build/ for more information.      ...failed!      (Failed, trying without DKMS)      Recompiling VirtualBox kernel modules ...failed!      (Look at /var/log/vbox-install.log to find out what went wrong)       < error > : I think it's because my arch is supposed to be i386 not i686, then                :vim /var/lib/dkms/vboxhost/4.3.8/build/make.log           1 DKMS make.log for vboxhost-4.3.8 for kernel 3.7.10blue-ghost1.9 (i686)      2 Thu Mar  6 13:10:22 PST 2014      3 make: Entering directory `/usr/src/linux-headers-3.7.10blue-ghost1.9'      4 /usr/src/linux-headers-3.7.10blue-ghost1.9/arch/x86/Makefile_32.cpu:2: *** missing separator.  Stop.      5 make: Leaving directory `/usr/src/linux-headers-3.7.10blue-ghost1.9'           :vim /var/log/vbox-install.log           1 Uninstalling modules from DKMS      2   removing old DKMS module vboxhost version  4.3.8      3       4 ------------------------------      5 Deleting module version: 4.3.8      6 completely from the DKMS tree.      7 ------------------------------      8 Done.      9 Attempting to install using DKMS     10      11 Creating symlink /var/lib/dkms/vboxhost/4.3.8/source ->     12                  /usr/src/vboxhost-4.3.8     13      14 DKMS: add Completed.     15      16 Kernel preparation unnecessary for this kernel.  Skipping...     17      18 Building module:     19 cleaning build area....     20 make KERNELRELEASE=3.7.10blue-ghost1.9 -C /lib/modules/3.7.10blue-ghost1.9/build M=/var/lib/dkms/vboxhost/4.3.8/build....     21 0     22 0     23 Failed to install using DKMS, attempting to install without     24 make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/3.7.10blue-ghost1.9/buil     25 /usr/src/linux-headers-3.7.10blue-ghost1.9/arch/x86/Makefile_32.cpu:2: *** missing separator.  Stop.     26 make: *** [vboxdrv] Error 2      So ?, I'm not a linux pro and I have work. I'll check back and update in about five hours :/               :uname -r     Linux ghostx 3.7.10blue-ghost1.9 #4 SMP Mon Mar 18 20:52:56 EDT 2013 i686 GNU/Linux     :whereis virtualbox dkms     virtualbox: /usr/bin/virtualbox /usr/lib/virtualbox /usr/share/virtualbox     dkms: /usr/src/nvidia-310.40/dkms.conf /usr/src/ndiswrapper-1.56/dkms.conf     /usr/src/vboxhost-4.3.8/dkms.conf /usr/sbin/dkms /etc/dkms     /usr/lib/dkms /usr/share/man/man8/dkms.8.gz          :dpkg --version     Debian `dpkg' package management program version 1.15.8.13 (i386).     This is free software; see the GNU General Public License version 2 or     later for copying conditions. There is NO warranty.          :make --version     GNU Make 3.81     Copyright (C) 2006  Free Software Foundation, Inc.     This is free software; see the source for copying conditions.     There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A     PARTICULAR PURPOSE.          This program built for i486-pc-linux-gnu          :vim /usr/src/linux-headers-3.7.10blue-ghost1.9/arch/x86/Makefile_32.cpu     # Put here option for CPU selection and depending optimization     choice     prompt "Processor family"     default M686 if X86_32     default GENERIC_CPU if X86_64          config M386     bool "386"     depends on X86_32 && !UML     ---help---       This is the processor type of your CPU. This information is used for       optimizing purposes. In order to compile a kernel that can run on       all x86 CPU types (albeit not optimally fast), you can specify       "386" here.            The kernel will not necessarily run on earlier architectures than       the one you have chosen, e.g. a Pentium optimized kernel will run on       a PPro, but not necessarily on a i486.            Here are the settings recommended for greatest speed:       - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI       486DLC/DLC2, and UMC 486SX-S.  Only "386" kernels will run on a 386       class machine.       - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or       SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.       - "586" for generic Pentium CPUs lacking the TSC       (time stamp counter) register.       - "Pentium-Classic" for the Intel Pentium.       - "Pentium-MMX" for the Intel Pentium MMX.       - "Pentium-Pro" for the Intel Pentium Pro.       - "Pentium-II" for the Intel Pentium II or pre-Coppermine Celeron.       - "Pentium-III" for the Intel Pentium III or Coppermine Celeron.       - "Pentium-4" for the Intel Pentium 4 or P4-based Celeron.       - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).       - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).       - "Crusoe" for the Transmeta Crusoe series.       - "Efficeon" for the Transmeta Efficeon series.       - "Winchip-C6" for original IDT Winchip.       - "Winchip-2" for IDT Winchips with 3dNow! capabilities.       - "GeodeGX1" for Geode GX1 (Cyrix MediaGX).       - "Geode GX/LX" For AMD Geode GX and LX processors.       - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.       - "VIA C3-2" for VIA C3-2 "Nehemiah" (model 9 and above).       - "VIA C7" for VIA C7.            If you dont know what to do, choose "386".          config M486     bool "486"     depends on X86_32     ---help---       Select this for a 486 series processor, either Intel or one of the       compatible processors from AMD, Cyrix, IBM, or Intel.  Includes DX,       DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or       U5S.          config M586     bool "586/K5/5x86/6x86/6x86MX"     depends on X86_32     ---help---       Select this for an 586 or 686 series processor such as the AMD K5,       the Cyrix 5x86, 6x86 and 6x86MX.  This choice does not       assume the RDTSC (Read Time Stamp Counter) instruction.          config M586TSC     bool "Pentium-Classic"     depends on X86_32     ---help---       Select this for a Pentium Classic processor with the RDTSC (Read       Time Stamp Counter) instruction for benchmarking.          config M586MMX     bool "Pentium-MMX"     depends on X86_32     ---help---       Select this for a Pentium with the MMX graphics/multimedia       extended instructions.          config M686     bool "Pentium-Pro"     depends on X86_32     ---help---       Select this for Intel Pentium Pro chips.  This enables the use of       Pentium Pro extended instructions, and disables the init-time guard       against the f00f bug found in earlier Pentiums.          config MPENTIUMII     bool "Pentium-II/Celeron(pre-Coppermine)"     depends on X86_32     ---help---       Select this for Intel chips based on the Pentium-II and       pre-Coppermine Celeron core.  This option enables an unaligned       copy optimization, compiles the kernel with optimization flags       tailored for the chip, and applies any applicable Pentium Pro       optimizations.          config MPENTIUMIII     bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"     depends on X86_32     ---help---       Select this for Intel chips based on the Pentium-III and       Celeron-Coppermine core.  This option enables use of some       extended prefetch instructions in addition to the Pentium II       extensions.          config MPENTIUMM     bool "Pentium M"     depends on X86_32     ---help---       Select this for Intel Pentium M (not Pentium-4 M)       notebook chips.          config MPENTIUM4     bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon"     depends on X86_32     ---help---       Select this for Intel Pentium 4 chips.  This includes the       Pentium 4, Pentium D, P4-based Celeron and Xeon, and       Pentium-4 M (not Pentium M) chips.  This option enables compile       flags optimized for the chip, uses the correct cache line size, and       applies any applicable optimizations.            CPUIDs: F[0-6][1-A] (in /proc/cpuinfo show = cpu family : 15 )            Select this for:         Pentiums (Pentium 4, Pentium D, Celeron, Celeron D) corename:         -Willamette         -Northwood         -Mobile Pentium 4         -Mobile Pentium 4 M         -Extreme Edition (Gallatin)         -Prescott         -Prescott 2M         -Cedar Mill         -Presler         -Smithfiled         Xeons (Intel Xeon, Xeon MP, Xeon LV, Xeon MV) corename:         -Foster         -Prestonia         -Gallatin         -Nocona         -Irwindale         -Cranford         -Potomac         -Paxville         -Dempsey               config MK6     bool "K6/K6-II/K6-III"     depends on X86_32     ---help---       Select this for an AMD K6-family processor.  Enables use of       some extended instructions, and passes appropriate optimization       flags to GCC.          config MK7     bool "Athlon/Duron/K7"     depends on X86_32     ---help---       Select this for an AMD Athlon K7-family processor.  Enables use of       some extended instructions, and passes appropriate optimization       flags to GCC.          config MK8     bool "Opteron/Athlon64/Hammer/K8"     ---help---       Select this for an AMD Opteron or Athlon64 Hammer-family processor.       Enables use of some extended instructions, and passes appropriate       optimization flags to GCC.          config MCRUSOE     bool "Crusoe"     depends on X86_32     ---help---       Select this for a Transmeta Crusoe processor.  Treats the processor       like a 586 with TSC, and sets some GCC optimization flags (like a       Pentium Pro with no alignment requirements).          config MEFFICEON     bool "Efficeon"     depends on X86_32     ---help---       Select this for a Transmeta Efficeon processor.          config MWINCHIPC6     bool "Winchip-C6"     depends on X86_32     ---help---       Select this for an IDT Winchip C6 chip.  Linux and GCC       treat this chip as a 586TSC with some extended instructions       and alignment requirements.          config MWINCHIP3D     bool "Winchip-2/Winchip-2A/Winchip-3"     depends on X86_32     ---help---       Select this for an IDT Winchip-2, 2A or 3.  Linux and GCC       treat this chip as a 586TSC with some extended instructions       and alignment requirements.  Also enable out of order memory       stores for this CPU, which can increase performance of some       operations.          config MELAN     bool "AMD Elan"     depends on X86_32     ---help---       Select this for an AMD Elan processor.            Do not use this option for K6/Athlon/Opteron processors!          config MGEODEGX1     bool "GeodeGX1"     depends on X86_32     ---help---       Select this for a Geode GX1 (Cyrix MediaGX) chip.          config MGEODE_LX     bool "Geode GX/LX"     depends on X86_32     ---help---       Select this for AMD Geode GX and LX processors.          config MCYRIXIII     bool "CyrixIII/VIA-C3"     depends on X86_32     ---help---       Select this for a Cyrix III or C3 chip.  Presently Linux and GCC       treat this chip as a generic 586. Whilst the CPU is 686 class,       it lacks the cmov extension which gcc assumes is present when       generating 686 code.       Note that Nehemiah (Model 9) and above will not boot with this       kernel due to them lacking the 3DNow! instructions used in earlier       incarnations of the CPU.          config MVIAC3_2     bool "VIA C3-2 (Nehemiah)"     depends on X86_32     ---help---       Select this for a VIA C3 "Nehemiah". Selecting this enables usage       of SSE and tells gcc to treat the CPU as a 686.       Note, this kernel will not boot on older (pre model 9) C3s.          config MVIAC7     bool "VIA C7"     depends on X86_32     ---help---       Select this for a VIA C7.  Selecting this uses the correct cache       shift and tells gcc to treat the CPU as a 686.          config MPSC     bool "Intel P4 / older Netburst based Xeon"     depends on X86_64     ---help---       Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey       Xeon CPUs with Intel 64bit which is compatible with x86-64.       Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the       Netburst core and shouldnt use this option. You can distinguish them       using the cpu family field       in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one.          config MCORE2     bool "Core 2/newer Xeon"     ---help---            Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and       53xx) CPUs. You can distinguish newer from older Xeons by the CPU       family in /proc/cpuinfo. Newer ones have 6 and older ones 15       (not a typo)          config MATOM     bool "Intel Atom"     ---help---            Select this for the Intel Atom platform. Intel Atom CPUs have an       in-order pipelining architecture and thus can benefit from       accordingly optimized code. Use a recent GCC with specific Atom       support in order to fully benefit from selecting this option.          config GENERIC_CPU     bool "Generic-x86-64"     depends on X86_64     ---help---       Generic x86-64 CPU.       Run equally well on all x86-64 CPUs.          endchoice          config X86_GENERIC     bool "Generic x86 support"     depends on X86_32     ---help---       Instead of just including optimizations for the selected       x86 variant (e.g. PII, Crusoe or Athlon), include some more       generic optimizations as well. This will make the kernel       perform better on x86 CPUs other than that selected.            This is really intended for distributors who need more       generic optimizations.          #     # Define implied options from the CPU selection here     config X86_INTERNODE_CACHE_SHIFT     int     default "12" if X86_VSMP     default X86_L1_CACHE_SHIFT          config X86_CMPXCHG     def_bool y     depends on X86_64 || (X86_32 && !M386)          config X86_L1_CACHE_SHIFT     int     default "7" if MPENTIUM4 || MPSC     default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU     default "4" if MELAN || M486 || M386 || MGEODEGX1     default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON ||    MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX          config X86_XADD     def_bool y     depends on !M386          config X86_PPRO_FENCE     bool "PentiumPro memory ordering errata workaround"     depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1     ---help---       Old PentiumPro multiprocessor systems had errata that could cause       memory operations to violate the x86 ordering standard in rare cases.       Enabling this option will attempt to work around some (but not all)       occurrences of this problem, at the cost of much heavier spinlock and       memory barrier operations.            If unsure, say n here. Even distro kernels should think twice before       enabling this: there are few systems, and an unlikely bug.          config X86_F00F_BUG     def_bool y     depends on M586MMX || M586TSC || M586 || M486 || M386          config X86_INVD_BUG     def_bool y     depends on M486 || M386          config X86_WP_WORKS_OK     def_bool y     depends on !M386          config X86_INVLPG     def_bool y     depends on X86_32 && !M386          config X86_BSWAP     def_bool y     depends on X86_32 && !M386          config X86_POPAD_OK     def_bool y     depends on X86_32 && !M386          config X86_ALIGNMENT_16     def_bool y     depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1          config X86_INTEL_USERCOPY     def_bool y     depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2          config X86_USE_PPRO_CHECKSUM     def_bool y     depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM          config X86_USE_3DNOW     def_bool y     depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML          config X86_OOSTORE     def_bool y     depends on (MWINCHIP3D || MWINCHIPC6) && MTRR          #     # P6_NOPs are a relatively minor optimization that require a family >=     # 6 processor, except that it is broken on certain VIA chips.     # Furthermore, AMD chips prefer a totally different sequence of NOPs     # (which work on all CPUs).  In addition, it looks like Virtual PC     # does not understand them.     #     # As a result, disallow these if we're not compiling for X86_64 (these     # NOPs do work on all x86-64 capable chips); the list of processors in     # the right-hand clause are the cores that benefit from this optimization.     #     config X86_P6_NOP     def_bool y     depends on X86_64     depends on (MCORE2 || MPENTIUM4 || MPSC)          config X86_TSC     def_bool y     depends on ((MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM) && !X86_NUMAQ) || X86_64          config X86_CMPXCHG64     def_bool y     depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM          # this should be set for all -march=.. options where the compiler     # generates cmov.     config X86_CMOV     def_bool y     depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)          config X86_MINIMUM_CPU_FAMILY     int     default "64" if X86_64     default "6" if X86_32 && X86_P6_NOP     default "5" if X86_32 && X86_CMPXCHG64     default "4" if X86_32 && (X86_XADD || X86_CMPXCHG || X86_BSWAP || X86_WP_WORKS_OK)     default "3"          config X86_DEBUGCTLMSR     def_bool y     depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386) && !UML          menuconfig PROCESSOR_SELECT     bool "Supported processor vendors" if EXPERT     ---help---       This lets you choose what x86 vendor support code your kernel       will include.          config CPU_SUP_INTEL     default y     bool "Support Intel processors" if PROCESSOR_SELECT     ---help---       This enables detection, tunings and quirks for Intel processors            You need this enabled if you want your kernel to run on an       Intel CPU. Disabling this option on other types of CPUs       makes the kernel a tiny bit smaller. Disabling it on an Intel       CPU might render the kernel unbootable.            If unsure, say N.          config CPU_SUP_CYRIX_32     default y     bool "Support Cyrix processors" if PROCESSOR_SELECT     depends on M386 || M486 || M586 || M586TSC || M586MMX || (EXPERT && !64BIT)     ---help---       This enables detection, tunings and quirks for Cyrix processors            You need this enabled if you want your kernel to run on a       Cyrix CPU. Disabling this option on other types of CPUs       makes the kernel a tiny bit smaller. Disabling it on a Cyrix       CPU might render the kernel unbootable.            If unsure, say N.          config CPU_SUP_AMD     default y     bool "Support AMD processors" if PROCESSOR_SELECT     ---help---       This enables detection, tunings and quirks for AMD processors            You need this enabled if you want your kernel to run on an       AMD CPU. Disabling this option on other types of CPUs       makes the kernel a tiny bit smaller. Disabling it on an AMD       CPU might render the kernel unbootable.            If unsure, say N.          config CPU_SUP_CENTAUR     default y     bool "Support Centaur processors" if PROCESSOR_SELECT     ---help---       This enables detection, tunings and quirks for Centaur processors            You need this enabled if you want your kernel to run on a       Centaur CPU. Disabling this option on other types of CPUs       makes the kernel a tiny bit smaller. Disabling it on a Centaur       CPU might render the kernel unbootable.            If unsure, say N.          config CPU_SUP_TRANSMETA_32     default y     bool "Support Transmeta processors" if PROCESSOR_SELECT     depends on !64BIT     ---help---       This enables detection, tunings and quirks for Transmeta processors            You need this enabled if you want your kernel to run on a       Transmeta CPU. Disabling this option on other types of CPUs       makes the kernel a tiny bit smaller. Disabling it on a Transmeta       CPU might render the kernel unbootable.            If unsure, say N.          config CPU_SUP_UMC_32     default y     bool "Support UMC processors" if PROCESSOR_SELECT     depends on M386 || M486 || (EXPERT && !64BIT)     ---help---       This enables detection, tunings and quirks for UMC processors            You need this enabled if you want your kernel to run on a       UMC CPU. Disabling this option on other types of CPUs       makes the kernel a tiny bit smaller. Disabling it on a UMC       CPU might render the kernel unbootable.            If unsure, say N.      apt sources.list                1 deb http://ftp.us.debian.org/debian squeeze main      2 deb-src http://ftp.us.debian.org/debian squeeze main      3       4 deb http://ftp.us.debian.org/debian squeeze-updates main      5 deb-src http://ftp.us.debian.org/debian squeeze-updates main      6       7 deb http://security.debian.org/ squeeze/updates main      8 deb-src http://security.debian.org/ squeeze/updates main      9      10 deb http://repository.spotify.com stable non-free     11      12 #deb http://ftp.us.debian.org/debian squeeze main     13 #deb-src http://ftp.us.debian.org/debian squeeze main     14      15 #deb http://ftp.us.debian.org/debian squeeze-updates main     16 #deb-src http://ftp.us.debian.org/debian squeeze-updates main      17      18 # remastersys:     19 # deb http://www.geekconnection.org/remastersys/repository squeeze/     20      21 # Squeezy Bullshit:     22 # deb http://ftp.de.debian.org/debian squeeze main non-free     23      24 #deb http://www.debian-multimedia.org squeeze main non-free     25 #deb-src http://www.debian-multimedia.org squeeze main non-free      Results:               :apt-get install linux-headers-($uname -r)     Reading package lists... Done     Building dependency tree            Reading state information... Done     linux-headers-3.7.10blue-ghost1.9 is already the newest version.     0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.          :apt-cache search virtualbox          imvirt - detects several virtualizations     libimvirt-perl - Perl module for detecting several virtualizations     libvirt-bin - the programs for the libvirt library     libvirt-dev - development files for the libvirt library     libvirt-doc - documentation for the libvirt library     libvirt0-dbg - library for interfacing with different virtualization systems     libvirt0 - library for interfacing with different virtualization systems     python-libvirt - libvirt Python bindings     virtualbox-ose-dbg - x86 virtualization solution - debugging symbols     virtualbox-ose-dkms - x86 virtualization solution - kernel module sources for dkms     virtualbox-ose-fuse - x86 virtualization solution - virtual filesystem     virtualbox-ose-guest-dkms - x86 virtualization solution - guest addition module source for dkms     virtualbox-ose-guest-source - x86 virtualization solution - guest addition module source     virtualbox-ose-guest-utils - x86 virtualization solution - non-X11 guest utilities     virtualbox-ose-guest-x11 - x86 virtualization solution - X11 guest utilities     virtualbox-ose-qt - x86 virtualization solution - Qt based user interface     virtualbox-ose-source - x86 virtualization solution - kernel module source     virtualbox-ose - x86 virtualization solution - base binaries     xmount - tool to crossmount between multiple input and output harddisk images     virtualbox-4.3 - Oracle VM VirtualBox          :apt-get install virutalbox     Reading package lists... Done     Building dependency tree            Reading state information... Done     virtualbox-4.3 is already the newest version.     0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.