Skip to content

Commit 54c1ee4

Browse files
committed
更新linux文档说明
1 parent b69a9af commit 54c1ee4

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Linux.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ $ sudo rm -rf /var/lib/apt/lists/partial/*
2626
$ sudo apt-get update
2727
```
2828

29+
查看系统版本
30+
```
31+
$ cat /proc/version
32+
```
2933

3034
显示操作系统32还是64位
3135
```
@@ -90,3 +94,35 @@ enabled=1
9094
修改为
9195
enabled=0
9296
```
97+
98+
ubuntu 连接 vpn 失败的解决办法
99+
```
100+
打开:网络链接,选择VPN标签,编辑选择的VPN,在VPN标签里,选择“高级”。
101+
选中“使用点到点加密(MPPE)”
102+
```
103+
104+
tree 显示目录树形结构
105+
```
106+
$ sudo apt-get install tree
107+
$ tree ./
108+
```
109+
110+
shell获取当前执行脚本的路径
111+
```
112+
file_path=$(cd "$(dirname "$0")"; pwd)
113+
或者
114+
file_path=$(cd `dirname $0`; pwd)
115+
```
116+
脚本文件的绝对路径存在了环境变量 file_path 中,可以用
117+
```
118+
echo $file_path
119+
```
120+
查看完整路径
121+
122+
在shell中:
123+
```
124+
$0: 获取当前脚本的名称
125+
$#: 传递给脚本的参数个数
126+
$$: shell脚本的进程号
127+
$1, $2, $3...:脚本程序的参数
128+
```

0 commit comments

Comments
 (0)