Linux基本基本命令
目标:掌握linux基本操作命令
磁盘类:
Fdisk:分区工具[必须具备root权限]
Bin和sbin目录区别:
/bin : commands in this dir are all system installed user commands 系统的一些指令
/sbin: commands in this dir are all system installed super user commands 超级用户指令 系统管理命令,这里存放的是系统管理员使用的管理程序
/usr/bin: user commands for applications 后期安装的一些软件的运行脚本
/usr/sbin: super user commands for applications 超级用户的一些管理程序[也是后期安装的]
每个用户都拥有一个主目录。所有用户的个人文件(配置、数据甚至应用程序)都放在其中。根的主目录为/root。大多数非根主目录包含在 /home 树中,通常以用户命名。重要的二进制位于 /bin(用户二进制)以及 /sbin(系统二进制)中。不重要的二进制(如图形环境或Office 工具)安装在 /usr/bin 和 /usr/sbin中。进行这种分隔是为了尽可能地缩小根分区。使用源代码编译的软件通常位于 /usr/local/bin 和 /usr/local/sbin中。
Which:查看可执行文件的位置
在$PATH中查找
Whereis:查找文件位置
在资料库中查找
Locate:局部匹配
进程类:
Pstree:进程树显示
软件源更新:
Ubuntu 13.04正式发布有段时间了, 在安装好后的第一件事就是给Ubuntu 13.04换源,软件源、更新源,Ubuntu网易的更新源速度还是不错。
相关阅读:
Ubuntu 13.04 正式版发布 http://www.linuxidc.com/Linux/2013-04/83435.htm
Windows 7下硬盘安装Ubuntu 13.04图文教程 http://www.linuxidc.com/Linux/2013-04/83479.htm
U盘启动安装Ubuntu 13.04 http://www.linuxidc.com/Linux/2013-04/83525.htm
下面上Ubuntu 13.04软件源、更新源:
首先,备份一下Ubuntu 13.04 原来的源地址列表文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
然后进行修改
sudo gedit /etc/apt/sources.list
可以在里面添加资源地址,我是直接覆盖掉原来的。
下面是LinuxIDC.COM认为一些较好的源,有大型网站的,也有教育网的,可以根据自己的情况添加两三个即可。
我就添加了Ubuntu 13.04网易的源
#网易的源(163源,无论是不是教育网,速度都很快)
deb http://mirrors.163.com/ubuntu/ raring main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ raring main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ raring-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ raring-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ raring-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ raring-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ raring-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ raring-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ raring-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ raring-updates universe main multiverse restricted
#搜狐的源(sohu 源今天还没有更新,不过应该快了)
deb http://mirrors.sohu.com/ubuntu/ raring main restricted
deb-src http://mirrors.sohu.com/ubuntu/ raring main restricted
deb http://mirrors.sohu.com/ubuntu/ raring-updates main restricted
deb-src http://mirrors.sohu.com/ubuntu/ raring-updates main restricted
deb http://mirrors.sohu.com/ubuntu/ raring universe
deb-src http://mirrors.sohu.com/ubuntu/ raring universe
deb http://mirrors.sohu.com/ubuntu/ raring-updates universe
deb-src http://mirrors.sohu.com/ubuntu/ raring-updates universe
deb http://mirrors.sohu.com/ubuntu/ raring multiverse
deb-src http://mirrors.sohu.com/ubuntu/ raring multiverse
deb http://mirrors.sohu.com/ubuntu/ raring-updates multiverse
deb-src http://mirrors.sohu.com/ubuntu/ raring-updates multiverse
deb http://mirrors.sohu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ raring-backports main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ raring-security main restricted
deb-src http://mirrors.sohu.com/ubuntu/ raring-security main restricted
deb http://mirrors.sohu.com/ubuntu/ raring-security universe
deb-src http://mirrors.sohu.com/ubuntu/ raring-security universe
deb http://mirrors.sohu.com/ubuntu/ raring-security multiverse
deb-src http://mirrors.sohu.com/ubuntu/ raring-security multiverse
deb http://extras.ubuntu.com/ubuntu raring main
deb-src http://extras.ubuntu.com/ubuntu raring main
#台湾源(台湾的ubuntu 更新源还是很给力的)
deb http://tw.archive.ubuntu.com/ubuntu/ raring main universe restricted multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ raring main universe restricted multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ raring-security universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ raring-security universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ raring-updates universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ raring-updates universe main multiverse restricted
#骨头源,骨头源是bones7456架设的一个Ubuntu源 ,提供ubuntu,deepin
deb http://ubuntu.srt.cn/ubuntu/ raring main universe restricted multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ raring main universe restricted multiverse
deb http://ubuntu.srt.cn/ubuntu/ raring-security universe main multiverse restricted
deb-src http://ubuntu.srt.cn/ubuntu/ raring-security universe main multiverse restricted
deb http://ubuntu.srt.cn/ubuntu/ raring-updates universe main multiverse restricted
deb http://ubuntu.srt.cn/ubuntu/ raring-proposed universe main multiverse restricted
deb-src http://ubuntu.srt.cn/ubuntu/ raring-proposed universe main multiverse restricted
deb http://ubuntu.srt.cn/ubuntu/ raring-backports universe main multiverse restricted
deb-src http://ubuntu.srt.cn/ubuntu/ raring-backports universe main multiverse restricted
deb-src http://ubuntu.srt.cn/ubuntu/ raring-updates universe main multiverse restricted
#ubuntu.cn99.com源(推荐):
deb http://ubuntu.cn99.com/ubuntu/ raring main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ raring-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ raring-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ raring-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ raring main restricted universe multiverse
#教育网源
#电子科技大学
deb http://ubuntu.uestc.edu.cn/ubuntu/ raring main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ raring-backports main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ raring-proposed main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ raring-security main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ raring-updates main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ raring main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ raring-proposed main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ raring-security main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ raring-updates main restricted universe multiverse
#中国科技大学
deb http://debian.ustc.edu.cn/ubuntu/ raring main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ raring-backports restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ raring-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ raring-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ raring-updates main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ raring main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ raring-proposed main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ raring-security main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ raring-updates main restricted universe multiverse
#北京理工大学
deb http://mirror.bjtu.edu.cn/ubuntu/ raring main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ raring-backports main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ raring-proposed main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ raring-security main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ raring-updates main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ raring main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ raring-backports main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ raring-proposed main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ raring-security main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ raring-updates main multiverse restricted universe
#兰州大学
deb ftp://mirror.lzu.edu.cn/ubuntu/ raring main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ raring-backports main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ raring-proposed main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ raring-security main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ raring-updates main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu-cn/ raring main multiverse restricted universe
#上海交通大学(上海交大源,教育网的速度不用说了)
deb http://ftp.sjtu.edu.cn/ubuntu/ raring main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ raring-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ raring-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ raring-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ raring-updates main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ raring main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ raring main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ raring-backports main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ raring-proposed main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ raring-security main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ raring-updates main multiverse restricted universe
添加好后保存,再输入 sudo apt-get update 就可以更新了,等着慢慢下载东西吧。
本篇文章来源于 Linux公社网站(www.linuxidc.com) 原文链接:http://www.linuxidc.com/Linux/2013-05/83902.htm