Day001——概要

文房四宝:
笔 笔记本 U盘 基础书(Linux,C,C++)
目录:
不用中文
不要太长
不要有空格
第一阶段:
1.Linux OS(4天)
2.C(10天)
3.Linux+C(8天)
4.Project

day01
1.安装vmware6.5虚拟机
2.安装Linux操作系统(.iso镜像文件)
password:wepull
3.了解Linux系统
redhat fedora ubuntu
4.精通30个命令,掌握100个命令
Linux最核心的就是命令
cd (change directory) .. .
pwd (print work directory)
ls (list)
clear
相对路径 vs 绝对路径(以/开头的路径)
~代表当前登录用户的主目录
以root登录 ~代表/root
以leno登录 ~代表/home/leno
/代表Linux顶级目录
mkdir (make directory)
ls -l(ls --help/man ls)
touch (create file)
tree
cp (copy)
mv (move /rename)
rmdir (remove empty directory)
rm -fr (force recursive remove directory)
tab快捷键
cat
echo wepull > test0 (回显 >是重定向命令)
vi编辑器
vi a.txt (进入命令模式)
按下a,i,o中的任意一个键,进入编辑(插入)模式
按下ESC键返回到命令模式
:wq(进入底行模式退出)

vi hello.c
#include <stdio.h>

int main(){
 printf("hello wepull\n");
 return 0;
}

cat hello.c
echo $PATH
gcc hello.c
(编译的作用:把人能够看懂的源文件转化成机器能够理解
的二进制代码)
file a.out
a.out(默认不能执行)
./a.out
/wp/day01/a.out

ctrl+c中断当前进程

ping 192.168.1.200
ifconfig
修改让Linux独占局域网的某个IP
1.将网络的连接方式改成bridged(桥接)
保证上面的connected勾选上
2.setup修改ip
静态配置IP地址 192.168.1.xx(保证其他人没有使用的IP)
3.重启网络服务
service network restart
如果失败,进2重新换IP,直到成功!
4.ifconfig命令查看Linux主机的IP
windows ping linux
linux ping windows
如果ping不通,注意关闭防火墙!!
linux 192.168.1.217
windows(ipconfig) 192.168.1.102
如何关闭linux防火墙?
service iptables stop/start/restart/status

搭建一个tftp服务器
1.查看tftp服务器是否安装
rpm -qa tftp*
如果没有安装,就安装
cd /mnt
mkdir cdr
mount /dev/cdrom /mnt/cdr

cd /mnt/cdr/Server
ls tftp*
rpm -ivh tftp-server.xxx.rpm
tftp服务是xinetd服务的子服务,装它前要
先装xinetd服务
2.查看tftp服务器是否启动
rpm -qa tftp*
service xinetd status
service xinetd start
chkconfig --list
chkconfig --list tftp
chkconfig tftp on
chkconfig --list tftp
3.测试tftp服务器的功能(C/S)
windows:tftp 192.168.1.217 get a.txt
保证tftp服务器上拥有a.txt资源文件
cd /tftpboot
echo just a test > a.txt

防火墙要关闭!!
为什么/tftpboot是tftp服务器的资源目录???
每一个服务器都会对应一个配置文件!!!
cd /etc/xinetd.d
cat tftp
umount /mnt/cdr

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值