What are deprecated? ifconfig netstats route What are the better options? ip ss lsof -iTCP Basic usages Command ip Show / manipulate routing, network devices, interfaces and tunnels Show ip adresses: ip address or ip a Show network devices: ip link or ip l Show routing table entry: ip route or ip r Use color output: for example ip -c a, ip -c l Command ss Another utility to investigate sockets

Continue reading

Get started with sed

What is sed? sed is a “stream editor for filtering and transforming text”. Here is a very detailed tutorial. Basic usages Use “s” for substitution Basic syntax: echo "Sunday Monday" | sed 's/day/night/' Sunnight Monday Note that only the first occurrence of day was replaced by night. To replace all, you have to use sed pattern flag /g for global replacement. echo "Sunday Monday" | sed 's/day/night/g' Sunnight Monnight Flexible delimiters I think we all agree that the following code is ugly:

Continue reading

Today I tried to fix an old issue with an old laptop having dual boot - windows / ubuntu. This issue occurred one day out of nowhere (someone from forums said it was caused by a windows update). While the windows system still boots, the laptop cannot boot into ubuntu and always gets stuck at a grub rescue shell with an error: file /boot/grub/x86_64-efi/normal.mod not found The following steps helped me to boot into linux:

Continue reading

Here I pledge to dedicate 1 hour to coding or learning Machine Learning for the next 100 days! Day 0: July 06, 2018 Today’s Progress Learned about word embedding in Sequence Models course on Coursera, such as Word2Vec, negative sampling, GloVe word vectors and sentiment classification. Thoughts It is interesting to know about how the word embedding algorithms are simplified over time while still being able to achieve very good results.

Continue reading

This post is a revised version of link. The following steps should be followed: Edit the file /etc/dnsmasq.conf on your router, and update the mac address associated with the intended ip address. dhcp-host=<mac address>,<ip address> Stop dnsmasq service sudo systemctl stop dnsmasq.service Next shutdown networking on the new client machine or the command dhclient -v -r might get the job done. Be aware, that this step will make the client lose the connection.

Continue reading

Here are the steps for configuring a DHCP server in a local network. Set static IP to the second network card enp9s3 (this name can be different on a different PC) on the DHCP server PC. Run sudo vi /etc/network/interfaces Edit the file according to this sample: # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback # The other network interface auto eno123 iface eno123 inet dhcp # DHCP server interface auto enp9s3 iface enp9s3 inet static address 15.

Continue reading

Problem Ethernet RTL8111/8168/8411 is not recognized by kernel 4.4.39-rt50. Running ifconfig shows only the other network interface and lo. Solution It turns out the realtime kernel does not have module r8168. Instead it contains r8169. However, by installing r8168-dkms the r8169 module is automatically blacklisted. This can be fixed by sudo apt remove r8168-dkms sudo rm /etc/modprobe.d/r8168-dkms.conf

Continue reading

Today I encountered a weird problem when using Eigen library with keyword auto. The scenario is as follows: Eigen::Affine3d aff; // aff is assigned with a valid value ... auto r = aff.rotation(); auto res = r * r; In the end, the result variable res contains a 3x3 matrix with only zero values, no matter what values aff has. After a bit of googling, I found out some relevant issues and Eigen documentation: * Eigen auto type deduction in general product * Eigen and C++11 type inference fails for Cholesky of matrix product * Lazy Evaluation and Aliasing

Continue reading

Disable WIFI and plug in an internet cable to your laptop so that your Ubuntu is connect to a wired internet and wireless is disabled. Go to Network Icon on top panel -> Edit Connections …, then click the “Add” button in the pop-up window. Choose Wi-Fi from the drop-down menu when you’re asked to choose a connection type: In next window, do: Type in a connection name. (This name will be used later) Type in a SSID Select mode: Infrastructure Device MAC address: select your wireless card from drop-down menu.

Continue reading

The following steps are needed for Kinect to work properly in Ubuntu 14.04. Prerequisites OpenNI Kinect Sensor Module Possible user group tuning Prerequisites The necessary packages: $ sudo apt-get install git build-essential python libusb-1.0-0-dev freeglut3-dev openjdk-7-jdk Optional: sudo apt-get install doxygen graphviz mono-complete OpenNI Check out from git: git clone https://github.com/OpenNI/OpenNI.git Compilation: cd OpenNi cd Platform/Linux/CreateRedist chmod +x RedistMaker ./RedistMaker Installation: cd .

Continue reading

Author's picture

Zheng Qu

A robotics enthusiast and learner.

Learner

Germany