ubuntu 重启网络命令: sudo /etc/init.d/networking restart sudo service networking start
ubuntu 重启网卡命令:先关闭接口:sudo ifconfig eth0 down 然后打开:sudo ifconfig eth0 up
ubuntu 关闭防火墙:sudo ufw disable
ubuntu配置静态IP:
$ sudo vim /etc/network/interfaces
configure static ip
auto eth0
iface eth0 inet static
address 192.168.0.5
gateway 192.168.0.253
netmask 255.255.255.0
NFS 配置
开发板和主机之间共享文件,常常需要配置nfs服务:
服务器端
安装:
root#:apt-get install nfs-common
root#:apt-get install nfs-kernel-server
编辑/etc/exports文件:
root#:gedit /etc/exports
添加一行:
[共享目录] [主机名或IP](参数,参数)
例如:/home/carl/nfs_share *(rw,sync,no_root_squash)
重启NFS 服务:
/etc/init.d/nfs-kernel-server start (可选stop, restart)
客户端:
目标板上,挂载NFS服务端共享的文件夹:
mount [server IP]:/[share dir] [local mount poin]
例如:mount -o nolock -t nfs 192.168.1.3:/home/nfs-share /mnt/nfs
这样就可以访问主机的文件了。
TFTP 服务配置
1、安装相关软件包:Ubuntu tftp(服务端),tftp(客户端),xinetd
sudo apt-get install tftpd tftp xinetd
2、建立配置文件
在/etc/xinetd.d/下建立一个配置文件tftp
sudo vi tftp
在文件中输入以下内容:
service tftp
{socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpShare
disable = no
per_source = 11
cps = 100 2
flags = IPv4}
保存退出
3、建立Ubuntu tftp服务文件目录(上传文件与下载文件的位置),并且更改其权限
sudo mkdir /tftpShare
sudo chmod 777 /tftpShare -R
4、tftp 重新启动服务
sudo /etc/init.d/xinetd restart
在使用put 的时候,一定要现在/tftpShare 目录中建立一个名为将put的新文件,且权限为777否则失败。
5:ubuntu 查看gdb 版本信息:
gdb --version
6.安装ssh服务 default port
$sudo apt-get instal openssh-server //server
$sudo apt-get install openssh-client //client
$sudo /etc/init.d/ssh start // start ssh service