Ubuntu Linux轻松入门

Ubuntu Linux轻松入门

3 (7人评价)
  • 课时:(26)

  • 学员:(348)

  • 浏览:(13570)

  • 加入课程

基本命令和文件系统的笔记

相关课时: 笔记详情:

Ubuntu shell:调用内核完成相应的功能

1 ls 当前目录列表

     ls  -l详细信息

     ls -lh 

2 tom@tom-desktop:-$

 登录用户名   网络中的名字 主目录

3 pwd 当前目录

4 sudo -i 提升权限

5 exit  退出root用户

6 按两下tab键 显示当前体统中可使用的命令

7 echo $Path 回显路径

8 free 系统的内存使用情况

9 which free  命令所在的磁盘

10 vi test1.sh 创建文件

11 chmod u+x test1.sh 添加权限

12 ./nanm.sh 执行当前目录可执行文件

13 命令名  --help 命令帮助命令

14 man 命令名  帮助

15 cd test/  更改目录到 test

     cd  主目录

     cd .. 上级目录

     cd /  根目录

16 cp test/test1.sh ./ 复制到当前目录

    cp test1.sh test2.sh 保留原文件重命名

    cp -r 递归复制

17 mv test1.sh test3.sh重命名

18 rm test2.sh  删除文件

    rm -r test 递归删除

19 groups 查看用户组

20 mkdir develop 创建目录

21 ubuntu 中  sudo mkdir develop 

     在uubuntu中已超级用户创建 目录

22 权限操作

     ls -l  查看当前目录的文件信息

     --- --- --- 当前用户权限  所属组的其他用户   其他用户

     rwx rwx rwx

     --- --- --- root root 0 时间 名称

    添加权限sudo chmod u+x helloworl

     u 当前用户  x 权限  

     g  主用户

     a 所有用户

     sudo chmod u-x  helloworl 消除可运          行权限

     sudo chown  tom helloworld更改当前文件的用户

     sudo chown tom.tom helloworld 用户组

22 sudo fdisk -l 查看文件系统

22 tree  当前目录中的文件系统的组织形式

    tree | less 将tree的输出转接

23 touch a.iso 挂载

    sudo mount -o loop a.iso /tem/cdrom   挂载在目录中

     sudo umont /tem/cdrom  卸载

24 find ./ -name "test" 在当前目录中查找文件名test的文件

    find ./ -name test* 以test开头的所有文件

25 locate test.sh  在数据库中搜索文件

26 whereis file  搜索file命令所在的环境位置

27 du /sbin 查看目录大小

    du -h /sbin 以M为单位

28 df 查看文件系统使用情况

    df -h

29 cat /exc/apt/sourse.list  查看文本信息

30 list  /exc/apt/sourse.list

    q 退出

    head -n 5 文件名 显示文件头五行

    tail -n 5  文件名   显示文件后五行

     

     

 

 

1 1

你感兴趣的课程

3万+浏览/ 1059学员/ 4.2评分
免费
系统运维 Windows 7使用教程
2万+浏览/ 472学员/ 4.7评分
免费
2万+浏览/ 710学员/ 4.1评分
免费