1. Connect your linux to the Internet. If you are installing a virtual machine, you can use the method of bridging the local network card to access the Internet (this method is introduced in the class). If you are installing linux independently, please solve it yourself. Configure the IP address and gateway, and set two DNS settings (8.8.8.8 and 114.114.114.114).
You can refer to the last blog.
Some Linux on the virtual machine can access the Internet as soon as you log in, and some cannot. The following is the tutorial link of the network configuration I refer to:
http://jingyan.baidu.com/article/6c67b1d68facbb2786bb1e7b.html
2. Log in to the system as root, create a directory webtest, enter the webtest directory, and append the contents of the ifcfg-eth0 file and the resolv.conf file to result.txt respectively.
su root
mkdir webtest
cd webtest
ifconfig >>result.txt
cat /etc/resolv.conf >>result.txt
- 1
- 2
- 3
- 4
- 5
3. Executeecho "1234567890这是分隔线0987654321" >> result.txt
traceroute www.scau.edu.cn >> result.txt
- 1
- 2
4. Executewget http://www.baidu.com
At this time, there will be one more index.html in the directory
5. Install lynx from source code
Official website: http://lynx.isc.org/
Download address: http://lynx.isc.org/current/ Please select the latest version
Installation example:
wget http://invisible-mirror.net/archives/lynx/tarballs/lynx2.8.8rel.2.tar.bz2
bzip2 -d lynx2.8.8rel.2.tar.bz2
- 1
Unzip lynx2.8.8rel.2.bzip2 -d lynx2.8.8rel.2.tar.bz2 tar.gz
tar -xvf lynx2.8.8rel.2.tar
- 1
Enter the unzipped directory to
find the unzipped directory name
cd lynx2-8-8
- 1
execute in sequence
./configure
make
make install
如果出现错误configure: error: No curses header-files found
Workaround: sudo apt-get install ncurses-dev
- 1
- 2
- 3
6、echo "1234567890这是分隔线0987654321" >> result.txt
7. Executewhereis lynx >> result.txt
8、echo "1234567890这是分隔线0987654321" >> result.txt
9、lynx -dump http://www.baidu.com >> result.txt
10. Submit the result.txt file