Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
风灵Erick
Python-100-Days
提交
25f9630c
P
Python-100-Days
项目概览
风灵Erick
/
Python-100-Days
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Python-100-Days
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
25f9630c
编写于
6月 23, 2018
作者:
骆昊的技术专栏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新了Linux文档
上级
a748707c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
85 addition
and
6 deletion
+85
-6
Day31-35/玩转Linux操作系统.md
Day31-35/玩转Linux操作系统.md
+85
-6
未找到文件。
Day31-35/玩转Linux操作系统.md
浏览文件 @
25f9630c
...
...
@@ -968,11 +968,45 @@ build environment:
### 配置服务
1.
启动服务。
```
Shell
[root@iZwz97tbgo9lkabnat2lo8Z ~]# systemctl start firewalld
```
2.
终止服务。
```
Shell
[root@iZwz97tbgo9lkabnat2lo8Z ~]# systemctl stop firewalld
```
3.
重启服务。
```
Shell
[root@iZwz97tbgo9lkabnat2lo8Z ~]# systemctl restart firewalld
```
4.
查看服务。
```Shell
[root@iZwz97tbgo9lkabnat2lo8Z ~]# systemctl status firewalld
```
5. 设置是否开机自启。
```
Shell
[root@iZwz97tbgo9lkabnat2lo8Z ~]# systemctl enable firewalld
Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service.
[root@iZwz97tbgo9lkabnat2lo8Z ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
```
### 计划任务
1. **crontab**命令。
...
...
@@ -989,44 +1023,89 @@ build environment:
```
Shell
[root@iZwz97tbgo9lkabnat2lo8Z ~]# ifconfig eth0
eth0: flags=4163
<UP
,
BROADCAST
,
RUNNING
,
MULTICAST
>
mtu 1500
inet 172.18.61.250 netmask 255.255.240.0 broadcast 172.18.63.255
ether 00:16:3e:02:b6:46 txqueuelen 1000 (Ethernet)
RX packets 1067841 bytes 1296732947 (1.2 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 409912 bytes 43569163 (41.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions
```
3. 显示/操作网络配置(新) - **ip**。
```
Shell
[root@iZwz97tbgo9lkabnat2lo8Z ~]# ip address
1: lo:
<LOOPBACK
,
UP
,
LOWER_UP
>
mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0:
<BROADCAST
,
MULTICAST
,
UP
,
LOWER_UP
>
mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:16:3e:02:b6:46 brd ff:ff:ff:ff:ff:ff
inet 172.18.61.250/20 brd 172.18.63.255 scope global eth0
valid_lft forever preferred_lft forever
```
4. 网络可达性检查 - **ping**。
```
Shell
[root@iZwz97tbgo9lkabnat2lo8Z ~]# ping www.baidu.com -c 3
PING www.a.shifen.com (220.181.111.188) 56(84) bytes of data.
64 bytes from 220.181.111.188 (220.181.111.188): icmp_seq=1 ttl=51 time=36.3 ms
64 bytes from 220.181.111.188 (220.181.111.188): icmp_seq=2 ttl=51 time=36.4 ms
64 bytes from 220.181.111.188 (220.181.111.188): icmp_seq=3 ttl=51 time=36.4 ms
--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 36.392/36.406/36.427/0.156 ms
```
5. 查看网络服务和端口 - **netstat**。
```
Shell
[root@iZwz97tbgo9lkabnat2lo8Z ~]# netstat -nap | grep nginx
```
6. 安全文件拷贝 - **scp**。
```
Shell
[root@iZwz97tbgo9lkabnat2lo8Z ~]# scp root@1.2.3.4:/root/guido.jpg hellokitty@4.3.2.1:/home/hellokitty/pic.jpg
```
7. 安全文件传输 - **sftp**。
```
Shell
[root@iZwz97tbgo9lkabnat2lo8Z ~]# sftp root@120.77.222.217
root@120.77.222.217's password:
Connected to 120.77.222.217.
sftp>
```
- `help`:显示帮助信息。
- `ls`/`lls`:显示远端/本地目录列表。
- `cd`/`lcd`:切换远端/本地路径。
- `mkdir`/`lmkdir`:创建远端/本地目录。
- `pwd`/`lpwd`:显示远端/本地当前工作目录。
- `get`:下载文件。
- `put`:上传文件。
- `rm`:删除远端文件。
- `bye`/`exit`/`quit`:退出sftp。
### Shell和Shell编程
1. 通配符。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录