生信星球培训第108期

Day5-Hector-Stepping into the wo

2021-05-19  本文已影响0人  Hector

· 认识Linux

· 使用Linux

· Win10操作系统

在Window10中,linux是一个内置的子系统。打开设置->更新和安全->针对开发人员->启用开发人员模式,然后打开控制面板->控制面板->程序->启用或关闭Windows功能->勾选适用于Linux的Windows子系统。然后重启电脑,在微软商店中下载Ubuntu。启动Ubuntu,当窗口显示安装成功后,设置用户名与密码进行注册(注意,输入密码时是没有任何提示的)。
然后,输入sudo apt update,完成后输入 sudo apt upgrade。其中,sudo 代表管理员,apt相当于install,下载和安装了更新,就可以投入使用。

· 云服务器使用Linux

使用免费的腾讯云服务器。先下载xshell:

xshell百度网盘:https://pan.baidu.com/s/1upnRTXwkI0hvxuuA2Gm49w 提取码: cnrv

在Xshell中新建会话,输入服务器的ip地址,用户名与密码。具体操作可见:https://www.jianshu.com/p/8a340b103a41]https://www.jianshu.com/p/8a340b103a41

· 常用操作集合

bio01@VM-0-6-ubuntu:~$ pwd #查看当前路径
/home/bio01
bio01@VM-0-6-ubuntu:~$ mkdir tmp #创建一个名为tmp的空目录
bio01@VM-0-6-ubuntu:~$ ls #显示当前所有目录与文件
tmp
bio01@VM-0-6-ubuntu:~$ cd tmp #进入tmp目录
bio01@VM-0-6-ubuntu:~/tmp$ cd #回到主页面,也可以输入cd ~
bio01@VM-0-6-ubuntu:~$ cd tmp
bio01@VM-0-6-ubuntu:~/tmp$ vi hello_world.txt #新建txt文件,名字为hello_world。然后会进入文本编辑页面。输入i开始输入文本内容,按Esc键 退出编辑模式。在左下角输入:x保存txt文件并退出
bio01@VM-0-6-ubuntu:~/tmp$ cat hello_world.txt #查看hello_world.txt
this is an empty document.
Filed by Hector.
bio01@VM-0-6-ubuntu:~/tmp$ head -1 hello_world.txt #输出hello_world.txt的第一行内容
this is an empty document.
bio01@VM-0-6-ubuntu:~/tmp$ cp hello_world.txt hello_world2.txt #将hello_world.txt复制,复制出来的新txt名字叫hello_world2.txt
bio01@VM-0-6-ubuntu:~/tmp$ mv hello_world2.txt hello_world3.txt  #将hello_world2.txt重命名为hello_world3.txt
bio01@VM-0-6-ubuntu:~/tmp$ mv hello_world3.txt ~ #将hello_world3.txt移动到主目录下
bio01@VM-0-6-ubuntu:~/tmp$ cd
bio01@VM-0-6-ubuntu:~$ ls
hello_world3.txt  tmp
bio01@VM-0-6-ubuntu:~$ rm -r tmp #删除非空目录tmp
bio01@VM-0-6-ubuntu:~$ ls
hello_world3.txt
bio01@VM-0-6-ubuntu:~$ rm hello_world3.txt #删除文件hello_world3.txt
bio01@VM-0-6-ubuntu:~$ ls
bio01@VM-0-6-ubuntu:~$




上一篇 下一篇

猜你喜欢

热点阅读