linux 学习旅程01
2017-03-07 10:28
211 查看
linux 有6个终端界面(命令行模式),还有一个图形化模式。
命令行模式:CTRL + ALT + F1-6 分别称为tty0-6
图形化模式:CTRL + ALT + F7 tty7
登陆到命令行界面(tty1)中,你会看到这样的语句
1.CentOS release 6.8 (Final)
显示linux distribution 的名称 CentOS 与 版本 6.8。
2.Kernel 2.6.------- on an x86_64
显示内核的版本为2.6——,目前这部主机的硬盘等级是x86_64。
3.DR1 login
DR1代表主机名 login 代表让我们登陆的用户名,在:后面输入。
在这里我用root登陆(注意:root在linux下有最高的权限)
4.Password
代表输入的密码,注意输入密码是不会有任何字符的。
5.[root@DR1 ~]#
root代表登陆的用户,@后面代表主机名,~代表当前所在的目录,#代表提示符。
离开linux(注销) 离开系统并不是关机
[root@DR1 ~]# exit
执行命令格式 : 命令 + 选项 + 参数
系统修改语言
[root@DR1 ~]# echo $LANG
zh_CN.UTF-8 (目前的语言为汉语)
修改语言:修改语言为英语
[root@DR1 ~]# LANG=en_US
[root@DR1 ~]# echo $LANG
en_US
基本的命令操作
1.查看时间:date
[root@DR1 ~]# date
2017年 03月 07日 星期二 21:49:32 CST
以年/月/日 格式显示
[root@DR1 ~]# date +%Y/%m/%d
2017/03/07
2.显示日历的命令:cal
[root@DR1 ~]# cal
三月 2017
日 一 二 三 四 五 六
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
显示2009年10月的日历
[root@DR1 ~]# cal 10 2009
十月 2009
日 一 二 三 四 五 六
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
3.简单计算器bc
+加 - 减 *乘 /除 ^指数 %余数
注意 你是不是很奇怪为什么10/100会是0
bc默认仅输出整数,如果想输入对应小数加上scale=number数字
退出的话输入quit或者直接用CTRL+C(这个组合键几乎可以停止一切东西比如命令中断)
man命令:如果不知道怎么使用某个命令可以利用man
[root@localhost 桌面]# man date
DATE(1) User Commands DATE(1)
NAME ===》 这个命令的完整名字
date - print or set the system date and time
SYNOPSIS ===》简短的命令执行语法的简介
date [OPTION]... [+FORMAT]
date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
<
aab3
br />
DESCRIPTION ===》详细说明刚才语法谈到的参数用法
Display the current time in the given FORMAT, or set the system date.
-d, --date=STRING
display time described by STRING, not ‘now’
-f, --file=DATEFILE
like --date once for each line of DATEFILE
中间省略。。。。
FORMAT controls the output. Interpreted sequences are: ===》格式化输出的详细数据
%% a literal %
%a locale’s abbreviated weekday name (e.g., Sun)
中间省略。。。。
ENVIRONMENT ===》 与这个命令相关的环境参数说明
TZ Specifies the timezone, unless overridden by command line param-
eters. If neither is specified, the setting from /etc/localtime
is used.
AUTHOR ===》这个命令的作者
Written by David MacKenzie.
REPORTING BUGS ===》有问题请留言给下面的email的意思
Report date bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report date translation bugs to <http://translationproject.org/team/>
COPYRIGHT ===》受到著作权法保护
Copyright © 2010 Free Software Foundation, Inc. License GPLv3+: GNU
GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
SEE ALSO ===》你可以从哪里查到与date相关的说明文件
The full documentation for date is maintained as a Texinfo manual. If
the info and date programs are properly installed at your site, the
command
info coreutils 'date invocation'
should give you access to the complete manual.
GNU coreutils 8.4 May 2016 DATE(1)
第一行DATE(1)
DATE为命令的名称
1 代表用户在shell环境中可操作的命令或者可执行的文件
2 代表系统内核可调用的函数与工具等
3 代表一些常用的函数(function)与函数库(library),大部分为C的函数库(libc)
4 代表设备文件的说明,通常在/dev下的文件
5 代表配置文件或者是某些文件的格式
6 代表游戏
7 代表惯例与协议等,例如linux文件系统,网络协议等说明
8 代表系统管理员可用的管理命令
9 代表跟kernel有关的文件
man使用方式
1.向下翻页是空格键
2.向下关键字查询可以直接输入“/” 后跟你要查询的关键字
向上关键字查询可以直接输入“?”后跟你要查询的关键字
3.按N,n : n可以继续向下查询关键字 N 可以反向查询
4.按下“q” 可以离开man
相关文章推荐
- 学习 Linux_01: 引导程序
- gmock学习01---Linux配置gmock
- 01_Linux学习_基础知识
- Linux C 学习笔记01-基本数据类型
- Linux 学习旅程
- Linux学习之shell笔记01
- Linux基础学习-01
- 逐梦旅程学习笔记 DirectX开发入门01:应用程序基本框架
- Linux 系统学习 leasson_01 初涉操作系統
- linux 驱动学习笔记01--Linux 内核的编译
- linux 学习笔记01
- 01_Linux学习_基础知识
- linux学习--01 计算机概述
- linux 学习笔记01 top
- 工作记录--linux下的C学习01
- PHPUnit学习01---Linux配置PHPUnit
- Shell脚本编程学习入门 01 分类: arm-linux-Ubuntu 2013-08-30 17:42 409人阅读 评论(0) 收藏
- Linux嵌入式学习旅程即将开航
- Linux学习-01-安装虚拟机与linux系统
- 【linux】【实验楼学习】【01】学习路线、快捷键、基础介绍