My Life in WordsAll about information and technology
|
When your laptop connect to internet by wire connection and you want to connect you phone to internet too, you can setup a wifi hotpot on your laptop. This is a setup guide on Windows 7. Setup hostednetwork by command lineStart cmd with Administrator. Run the following command line. C:\>netsh wlan set hostednetwork mode=allow ssid="ssid" key="yourkey" C:\>netsh wlan show hostednetwork Setup DNS for Microsoft Virtual Miniport AdapterAt control center->Network and Internet->Network Connection, right click the new created Microsoft Virtual WiFi Miniport Adapter, set up the DNS as the one of your local connection. Share with the Local ConnectionRight click the Local Connection, click the Properties and go to the share tab. Select allow other users connect to Internet by this connection and choose the connection name as the Microsoft Virtual Miniport Adapter's name. Start hostednetworkBack to the cmd shell, and run: C:\>netsh wlan start hostednetwork Test itFind the ssid from your phone and connect to it.
1 Comment
If you want to if your compiler, such as gcc, support the advanced instruction set. For example, you want to know if SSE4.2 is supported. You can compile and run the following program. Check the include header file cpuid.h you can find more macro definition for other instruction set. #include <cpuid.h> #include <stdio.h> void main () { unsigned int eax, ebx, ecx, edx; __get_cpuid(1, &eax, &ebx, &ecx, &edx); if (ecx & bit_SSE4_2) printf ("SSE4.2 is supported\n"); return; } Reference: http://www.drdobbs.com/parallel/fast-parallelized-crc-computation-using/229401411 You can also use the command "gcc -march=native -E -v </dev/null 2>&1 | grep cc1" to check the architecture that GCC recognizes.
System OSThe host OS: Ubuntu 16.04 The Guest OS: CentOS 7.2 Virtualbox version: 5.1.18 Connect Guest to the InternetSet VM network by VM->Settings->Network. Attached to "NAT Network". Make sure the Name is the default setting as "NatNetwork" and keep the Advanced setting unchanged, so it will choose the right Adapter Type and keep the Cable Connected. Connect the Guest and the HostSet VM network by VM->Settings->Network. Attached to "Host-only Adapter". Keep the others as default. Maybe the Name is blank. If you may meet an error like as"VERR_INTNET_FLT_IF_NOT_FOUND" when start the VM, you can fix it by manually create host-only adapter. $vboxmanage hostonlyif create The back to VM->Settings->Network. Make sure the Name of Host-only Adapter is vboxnet0. Configure Inside of the VMInside of the Guest, you just need to up the network adapter. Open Application->System Tools->Settings->Network, turn on the two Ethernet. Run ifconfig to check the network adapter information. The network adapter that ip address is 10.0.x.x would be used to connect to the Internet. The network adapter that ip address is 192.168.x.x would be used to connect with the host. Issues You May MeetIf you meet "Device not Managed", and it can't be solved even if you follow the instruction at https://askubuntu.com/questions/71159/network-manager-says-device-not-managed. You can fix it follow these steps:
|
AuthorThis is a blog that is about my works on Benchmarking Performance, Compiling Optimization, Optimize Compile, Parallel Programming, Virtualization, Container, Docker, Moby, Linuxkit, Open Source and any others. Archives
August 2018
Categories |