ethtool是一个用来查看网卡状态的工具。在ubuntu18.04中如何安装和使用ethtool工具呢?本文给出详细说明。
1.首先更新软件列表
sudo apt update
2.安装ethtool工具
sudo apt-get install ethtool
3.查看网卡状态
ethtool 网卡名称
1.更新软件列表
sudo apt update
2.安装telnet服务
sudo apt install openbsd-inetd telnetd
3.查看telnet运行状态
netstat -a | grep telnet
4.登录测试
telnet 127.0.0.1
snap是一种全新的软件包管理方式。它与其它包管理器的区别在于snap安装的程序互相之间是高度隔离的,减少了互相引用. 避免了很多冲突问题。但是由此带来的问题就是它占用更多的磁盘空间。那么在ubuntu18.04系统中如何安装和使用snap呢?本文给出详细说明。
1.首先更新软件列表
sudo apt-get update
2.安装snap
sudo apt-get install snap
sudo apt-get install snapd
3.之后就可以用snap来代替apt管理软件了
4.搜索要安装的snap包
sudo snap find hello-world
5.安装snap包
sudo snap install hello-world
6.查看已安装snap包
sudo snap list
7.更新已安装snap包
sudo snap refresh hello-world
没有找到更新的版本了,无需更新
8.卸载已安装snap包
sudo snap remove hello-world
ifstat命令是一个监控网络接口活动状态的工具。在ubuntu18.04中如何安装和使用ifstat工具呢?本文给出详细说明。
1.首先更新软件列表
sudo apt update
2.安装git工具
sudo apt install ifstat
3.使用ifstat工具监控流量
ifstat
常用ifstat -tT可以更直观的监控流量
ifstat -tT
说明:-t代表显示当前时间,-T表示显示所有端口的所有流量
1.更新软件列表
sudo apt update
2.安装aptitude
sudo apt install aptitude
3.aptitude的使用:
更新软件列表
aptitude update
安装软件
aptitude install 软件包名
卸载软件
aptitude remove 软件包名
说明:aptitude的使用和apt的基本相同,但aptitude在处理软件依赖问题上更佳一些。
wireshark是世界上最流行的网络分析工具。在ubuntu18.04中如何安装wireshark工具呢?本文给出详细说明。
1.首先更新软件列表
sudo apt update
2.安装wireshark工具
sudo apt install wireshark
3.测试是否安装成功
wireshark -v
webpack 是当下最热门的前端资源模块化管理和打包工具。它可以将许多松散的模块按照依赖和规则打包成符合生产环境部署的前端资源。那么在ubuntu18.04中如何安装webpack呢?本文给出详细说明。
1.首先更新软件列表
sudo apt-get update
2.安装node.js
sudo apt-get install nodejs
3.安装nmp
sudo apt-get install npm
4.安装webpack和webpack-cli
npm install -g webpack
npm install -g webpack-cli
5.查看webpack版本
webpack -v
安装完成
web.py 是一个Python 的web 框架,它简单而且功能强大。那么在ubuntu18.04中如何安装web.py呢?本文给出详细说明。
1.首先确认安装了python3
说明:一般linux系统默认都有安装python环境,包括python2和python3,在命令行中python默认指的是python2。python2已经接近淘汰,但由于linux系统环境中还有大量基于python2的软件,因此在linux系统中还保留着python2。目前推荐使用python3。
2.更新软件列表
sudo apt-get update
3.安装python3-pip
sudo apt-get install python3-pip
4.安装webpy
sudo pip3 install web.py
5.编写测试程序
vi hello.py
向hello.py中写入以下内容
import web
urls = (
'/(.*)','hello'
)
app = web.application(urls,globals())
class hello:
def GET(self,name):
if not name:
name='world'
return 'hello,' name '!'
if __name__ == '__main__':
app.run()
保存退出
6.运行测试程序
python3 hello.py
在浏览器打开主机IP:8080
安装成功
Express是一个简洁而灵活的 node.js Web应用框架。那么在ubuntu18.04中如何安装Express呢?本文给出详细说明。
1.首先更新软件列表
sudo apt-get update
2.安装node.js
sudo apt install nodejs
3.安装npm工具
sudo apt-get install npm
4.安装 Express 并将其保存到依赖列表中
npm install express --save
5.创建名为express_demo.js的测试文件并写入测试代码
vi express_demo.js
写入
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send('Hello World');
})
var server = app.listen(8081, function () {
var host = server.address().address
var port = server.address().port
console.log("应用实例,访问地址为 http://%s:%s", host, port)
})
保存退出
6.测试
node express_demo.js
在浏览器打开主机IP:8081可以看到