nano命令和ftp服务器
2017-01-24 17:03
183 查看
1.什么时候用nano?
一般网络很卡,ssh时一用vim/vi 就死窗口,或者死机的情况
2.如何使用?
打开或新建文件
#nano 文件名 vi nano /etc/test.c
禁用自动换行
#nano -w /etc/fstab
树莓派使用ftp服务器在windows和树莓派之间传文件
1 在linux系统安装ftp,那个工具叫做vsftpd,vsftpd是开源的轻量级的常用ftp服务器
sudo apt-get install vsfptd
2 启动ftp服务
Sudo service vsftpd start
3 配置ftp文件
sudo nano /etc/vsftpd.conf
展示vsftpd.conf+翻译
# The default compiled in settings are fairly paranoid. This sample file
a# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
这个默认编译时相当偏执的。为了让ftp守护进程更加有用,这个示例对于配置稍微放松一点。请参阅
vsftpd.conf.5所有编译的缺省值。
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
这个示例文件并不是一个详尽的vsftp选项清单。请读vsfftp.conf.5手册获取一个完整的vsftpd的
功能
# Run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
独立运行?从initscript开始,vsftpd可以从一个inetd运行,或者是一个独立的守护进程
#需要配置的语句1
listen=YES//这句话才是在配置文件里面真正执行的,前面加#的都只是注释
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
这个指令允许监听IPv6的sockets。默认情况下,监听到的IPv6任何地址会允许从IPv6和IPv4客户端
的连接。监听IPv4和IPv6的socket并不是必要的。如果你想要(可能因为你想要去监听一些特殊的
地址),然后你必须运行两个配置文件的复印件
需要配置的语句2
listen_ipv6=NO
# Allow anonymous FTP? (Disabled by default).允许匿名的FTP吗
anonymous_enable=NO
#Uncomment this to allow local users to log in
取消允许本地客户登陆
需要修改的语句3
local_enable=YES允许本地客户登陆
# Uncomment this to enable any form of FTP write command.
取消允许任何形式的FTP写请求
需要修改的语句4
write_enable=YES允许写请求,但是注意,是加#,也就是是注释掉的
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
默认掩码是077,你可能希望是022,如果你的用户希望是022(022被大多数的ftp使用)
本地掩码:022
配置到这里已经完成,如果需要进一步设置的话,例如这里的设置对匿名用户是不给予任何权限的,假如想要对匿名用户给予权限,则要仔细阅读配置文件进行下一步配置
可以通过cuteftp将文件从windows传送到板子上:
cuteftp只是一个ftp工具,也可以用其他的ftp工具
可以将windows任意目录的文件共享到/home/pi这个文件目录下(只能共享到pi这个目录,其他目录不够权限)
假如要共享到其他目录下,两个办法,1 修改配置文件 2 修改目录权限
下面讲解第二种方法:
假如我要将文件放置到pi的/boot/overlays
1 修改目录权限
sudo chmod 777 /boot/overlays
777是目录拥有的权限,
一般网络很卡,ssh时一用vim/vi 就死窗口,或者死机的情况
2.如何使用?
打开或新建文件
#nano 文件名 vi nano /etc/test.c
禁用自动换行
#nano -w /etc/fstab
树莓派使用ftp服务器在windows和树莓派之间传文件
1 在linux系统安装ftp,那个工具叫做vsftpd,vsftpd是开源的轻量级的常用ftp服务器
sudo apt-get install vsfptd
2 启动ftp服务
Sudo service vsftpd start
3 配置ftp文件
sudo nano /etc/vsftpd.conf
展示vsftpd.conf+翻译
# The default compiled in settings are fairly paranoid. This sample file
a# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
这个默认编译时相当偏执的。为了让ftp守护进程更加有用,这个示例对于配置稍微放松一点。请参阅
vsftpd.conf.5所有编译的缺省值。
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
这个示例文件并不是一个详尽的vsftp选项清单。请读vsfftp.conf.5手册获取一个完整的vsftpd的
功能
# Run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
独立运行?从initscript开始,vsftpd可以从一个inetd运行,或者是一个独立的守护进程
#需要配置的语句1
listen=YES//这句话才是在配置文件里面真正执行的,前面加#的都只是注释
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
这个指令允许监听IPv6的sockets。默认情况下,监听到的IPv6任何地址会允许从IPv6和IPv4客户端
的连接。监听IPv4和IPv6的socket并不是必要的。如果你想要(可能因为你想要去监听一些特殊的
地址),然后你必须运行两个配置文件的复印件
需要配置的语句2
listen_ipv6=NO
# Allow anonymous FTP? (Disabled by default).允许匿名的FTP吗
anonymous_enable=NO
#Uncomment this to allow local users to log in
取消允许本地客户登陆
需要修改的语句3
local_enable=YES允许本地客户登陆
# Uncomment this to enable any form of FTP write command.
取消允许任何形式的FTP写请求
需要修改的语句4
write_enable=YES允许写请求,但是注意,是加#,也就是是注释掉的
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
默认掩码是077,你可能希望是022,如果你的用户希望是022(022被大多数的ftp使用)
本地掩码:022
配置到这里已经完成,如果需要进一步设置的话,例如这里的设置对匿名用户是不给予任何权限的,假如想要对匿名用户给予权限,则要仔细阅读配置文件进行下一步配置
可以通过cuteftp将文件从windows传送到板子上:
cuteftp只是一个ftp工具,也可以用其他的ftp工具
可以将windows任意目录的文件共享到/home/pi这个文件目录下(只能共享到pi这个目录,其他目录不够权限)
假如要共享到其他目录下,两个办法,1 修改配置文件 2 修改目录权限
下面讲解第二种方法:
假如我要将文件放置到pi的/boot/overlays
1 修改目录权限
sudo chmod 777 /boot/overlays
777是目录拥有的权限,
读、写、运行三项权限可以用数字表示,就是r=4,w=2,x=1。三个7就是user 用户组和其他人
2 cp /目录1/文件名 /目录2
cp是将文件从目录1复制到目录2
相关文章推荐
- Serv-U在linux下使用ftp命令访问windows下的ftp服务器
- FTP服务器的配置以及访问和机制的常用命令.十三
- linux下常用FTP命令 1. 连接ftp服务器
- linux访问ftp服务器命令
- 以命令方式从FTP 服务器下载文件到本地指定目录
- FTP服务器的Copy命令的使用
- liux下ftp链接服务器的常用命令
- wget lftp 命令下载ftp服务器的文件
- linux下常用FTP命令 1. 连接ftp服务器
- C#FTP下载文件出现远程服务器返回错误: (500) 语法错误,无法识别命令
- 批命令从FTP服务器GET由当前日期组合成文件名的文件
- vmware虚拟机里面在Windows XP系统下架设FTP服务器及ftp常用命令
- 访问Linux下ftp服务器 ,客户端获取到:“服务器返回 无法识别的命令”
- linux 远程连接服务器ftp命令整理
- FTP服务器配置与管理(4) 服务器端的常用配置及FTP命令
- [转]登陆FTP服务器feat命令错误的解决方法
- ftp 服务器测试 命令
- FTP连接服务器遇到的FEAT命令的问题
- telnet命令和ftp服务器和linux命令常用
- Linux-FTP服务器终端窗口用命令进行启动.