1、申请切换root用户,其中/home/topeet是用户文件夹
topeet@ubuntu:~$ su root
密码:
root@ubuntu:/home/topeet#
2、显示命令
语法:ls [选项] [路径]
功能:显示指定工作目录下的内容
root@ubuntu:/home/topeet# ls
Android_JDK make-3.81 公共的 文档
Android_JDK.tar.gz make-3.81.tar.bz2 模板 下载
code_1.59.1-1629375198_amd64.deb makeinstall 视频 音乐
examples.desktop work 图片 桌面
3、-a 显示所有文件以及目录
root@ubuntu:/home/topeet# ls -a
. makeinstall
.. .mozilla
Android_JDK .pam_environment
Android_JDK.tar.gz .pki
.bash_history .profile
.bash_logout .sudo_as_admin_successful
.bashrc .vscode
.cache work
code_1.59.1-1629375198_amd64.deb .Xauthority
.compiz .xinputrc
.config .xsession-errors
.dbus .xsession-errors.old
.dmrc 公共的
examples.desktop 模板
.gconf 视频
.gnupg 图片
.ICEauthority 文档
.local 下载
make-3.81 音乐
make-3.81.tar.bz2 桌面
4、-l 列出文件名称外,还将文件形态、权限、拥有者、文件大小等详细信息列出
root@ubuntu:/home/topeet# ls -l
总用量 147288
drwxr-xr-x 4 root root 4096 9月 25 07:39 Android_JDK
-rw-r--r-- 1 root root 71509982 9月 25 07:30 Android_JDK.tar.gz
-rw-r--r-- 1 topeet topeet 78093232 10月 30 14:51 code_1.59.1-1629375198_amd64.deb
-rw-r--r-- 1 topeet topeet 8980 9月 25 01:15 examples.desktop
drwxrwxrwx 9 topeet topeet 4096 9月 25 07:37 make-3.81
-rw-r--r-- 1 root root 1151445 9月 25 07:29 make-3.81.tar.bz2
drwxr-xr-x 6 root root 4096 9月 25 07:37 makeinstall
drwxr-xr-x 2 root root 4096 10月 31 16:09 work
drwxr-xr-x 2 topeet topeet 4096 10月 31 16:39 公共的
drwxr-xr-x 2 topeet topeet 4096 10月 31 16:39 模板
drwxr-xr-x 2 topeet topeet 4096 10月 31 16:39 视频
drwxr-xr-x 2 topeet topeet 4096 10月 31 16:39 图片
drwxr-xr-x 2 topeet topeet 4096 10月 31 16:39 文档
drwxr-xr-x 2 topeet topeet 4096 10月 31 16:39 下载
drwxr-xr-x 2 topeet topeet 4096 10月 31 16:39 音乐
drwxr-xr-x 2 topeet topeet 4096 10月 31 16:39 桌面
5、查看当前工作路径
语法:pwd
功能:显示当前工作目录的绝对路径
root@ubuntu:/home/topeet# pwd
/home/topeet
6、显示和配置网络属性
语法:ifconfig [interface]
功能:查看或设置网络设备属性主要参数
root@ubuntu:/home# ifconfig
ens33 Link encap:以太网 硬件地址 00:0c:29:c0:a7:cb
inet 地址:192.168.11.128 广播:192.168.11.255 掩码:255.255.255.0
inet6 地址: fe80::bab8:59b5:7485:3013/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:155342 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:50424 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:197727479 (197.7 MB) 发送字节:6165208 (6.1 MB)
lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:3590 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:3590 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1
接收字节:417686 (417.6 KB) 发送字节:417686 (417.6 KB)
7、在Ubuntu中更换下载服务器以及查看更新情况
更换下载服务器的步骤:Ubuntu界面右上角的“设置”–》“系统设置”–》“软件和更新”–》“Ubuntu软件”–》“下载至”“其它站点”,此处以阿里云为例。
topeet@ubuntu:~$ su root
密码:
root@ubuntu:/home/topeet# apt-get update
命中:1 http://mirrors.aliyun.com/ubuntu xenial InRelease
命中:2 http://packages.microsoft.com/repos/code stable InRelease
命中:3 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease
命中:4 http://mirrors.aliyun.com/ubuntu xenial-backports InRelease
命中:5 http://mirrors.aliyun.com/ubuntu xenial-security InRelease
忽略:6 http://cz.archive.ubuntu.com/ubuntu trusty InRelease
命中:7 http://cz.archive.ubuntu.com/ubuntu trusty Release
正在读取软件包列表... 完成
另外,今天有个事情需要说明一下,经过前两天的系统安装,环境配置,插件驱动等的安装,也学习到了一些知识。比如了解了windows和Ubuntu之间的文件共享,今天在操作“Ubuntu当中visual studio code 软件的安装”过程中, 因为windows里面已经下载好了,所以只需要把windows里面的文件拷贝到Ubuntu里面,起初想着windows和Ubuntu里面已经由于一些驱动、软件的安装实现了文件共享,所以直接把文件赋值粘贴了进去,但是在Ubuntu里面输入命令时报错了。这才想起来用ssh软件去传输一下。打开ssh,点击quick connect,填好ip地址和用户名,传输过去即可。传输好之后,Ubuntu中输入命令,这样才可以成功下载好。