Linux原来还可以这么用
# 前言
本文主要记录使用在使用Linux
中一些不会的技巧做得笔记,不定时增加新的技巧。
# Linux
共享
- 直接桌面上新建『共享文件夹』,右键『属性』,选择『本地网络共享』,勾选『共享此目录』、『允许匿名登录』,这时候会提示需要安装
samba
,按照图形界面安装即可。
# 如何共享给小米电视
本文小节出现的时间为
2022-07-14
,此时间内小米电视仍无法通过电脑直接共享的形式读取到文件
小米电视可以访问电脑共享文件,但是直接共享后是无法识别的,主要是小米工程师不知道在干啥,还在用古老的SMB 1.0
的协议,SMB 1.0
协议因为漏洞问题新的系统默认都是禁止的,所以只能开启SMB 1.0
协议。
# 编辑samba的配置文件
sudo vim /etc/samba/smb.conf
# 打开文件后找到 [global] 后,添加以下内容
server min protocol = CORE
1
2
3
4
5
2
3
4
5
警告
如果设备在公网中就别开启了,老老实实用U盘吧。
# 时间模块
# 时间同步
yum install ntp ntpdate -y
ntpdate cn.pool.ntp.org
1
2
3
2
3
# 修改时间
date -s 时间
# 更改Linux时间为2022-11-24 15:15:15
date -s 2022-11-24 15:15:15
1
2
3
4
2
3
4
# 网络模块
# 查看所有网卡实时速度
sudo nload -m
1
# 配置宽带信息
# 1. 进入设置
pppoe-setup
# 2.
Please enter the device if you want to configure the present DSL config
(default ppp0) or enter 'n' if you want to create a new one:
# 别理会这玩意直接回车
# 3.
Enter your Login Name
# 这里输入运营商给的宽带账户
# 第四步到第六步均是回车
# 4.
Enter the Ethernet interface connected to the PPPoE modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where 'X' is a number.
(default eth0):
# 回车
# 5.
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
Enter the demand value (default no):
# 回车
# 6.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
Enter the DNS information here:
# 回车
# 7.
Please enter your Password:
# 输入宽带密码
# 8.
Please re-enter your Password:
# 再次输入宽带密码
# 9.
Please enter 'yes' (three letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes):
# 回车
# 10.
The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
Choose a type of firewall (0-2):
# 输入 0
# 11.
Do you want to start this connection at boot time?
Please enter no or yes (default no):
# 输入 yes
# 12.
reboot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
更新时间: 2023/1/29 13:51:27