Embedded linux study notes two --linux embedded development environment built notebook

This two-day learning summarize

sudo: elevated privileges for the average user

sudo is

linux system administration commands allow system administrators to allow ordinary users to perform some or all of the root command a tool, such as a halt, reboot, su, and so on. This not only reduces the root user login and management time, also improves security. sudo not to place a shell, which is for each command.

//==============================================================================

 

Sudo passwd root to reset the password

su: administrator privileges switch

SU is (Switch user switch user) that allows users to switch to a common

Superuser or another user, may have temporarily switched users

Rights , need to enter the password when switching users want to switch; also allows the user to switch to super ordinary users with low privileges temporary status of business, without having to enter a password when switching users want to switch.

su - root switch to the root user, you need to enter a password, after switching environment variable is changed almost unlimited do anything.

su - trunk back to the root switch from ordinary users, without a password, with only trunk privileges after switching.

//============================================================================

 

Sudo apt-get update // update the data source

 

vim knowledge

Substantially vi / vim divided into three modes, namely, command mode (MODE the Command) , the input mode (Insert mode) , and the bottom line command mode (MODE Last Line) . The role of these three models are:

Command mode:

Users just started vi / vim, then enter the command mode.

Keystrokes operation in this state is recognized as a command Vim, not input characters. For example, we then press the i, and does not enter a character, i is treated as a command.

The following are a few commonly used commands:

  • i is switched to the input mode to input characters.
  • x delete the character at the current cursor position.
  • : Handover in the end line command mode to enter commands in the bottom row.

If you want to edit the text: start Vim, enter the command mode, press the i, switch to the input mode.

Command mode is only some basic commands, so the bottom line still rely on command mode enter more commands.

Input Mode

In the command mode by pressing i entered the input mode.

In input mode, the following keys:

  • Character keys and combinations of the Shift , enter characters
  • The ENTER , enter, line feed
  • SPACE the BACK , backspace, delete a character before the cursor
  • DEL , delete key, delete the cursor one character
  • Arrow keys , move the cursor in the text
  • The HOME / the END , move the cursor to the beginning / end of the line
  • Up Page / Page Down , up / page down
  • INSERT , move the cursor to an input / replace mode, the cursor will change to a vertical line / underline
  • The ESC , exit the input mode is switched to the command mode

Bottom line command mode

Press :( colon) in the command mode to enter the bottom line command mode.

Bottom Line Command Mode can enter commands single or a plurality of characters, a lot of available commands.

In the bottom line command mode, commands are basic (colon have been omitted):

  • q to exit the program
  • w Save the file

Press ESC at any time to exit the bottom line command mode.

//====================================================================================

Check ip address command ifconfig

sshd server set up

ssh:  Secure Shell

The client SecureCRT client software

 

SSHD server

operating

   apt-get install openssh-server installation sshd server

Sshd completed structures

//====================================================

Upload and download files between the client and server functions

zmodem agreement

Linux   安装zmodem         sudo apt-get install lrzsz

cat command file and connected to the standard output device prints

               rz (file upload) sz filename (file download)

 

//======================================================================

samba service

Samba is

LinuxUNIX系统上实现SMB协议的一个免费软件,由服务器及客户端程序构成。SMB(Server Messages Block,信息服务块)是一种在局域网上共享文件和打印机的一种通信协议,它为局域网内的不同计算机之间提供文件及打印机等资源的共享服务。SMB协议是客户机/服务器型协议,客户机通过该协议可以访问服务器上的共享文件系统、打印机及其他资源。

Linux  sambam服务器的安装    apt-get install samba4

进入服务器配置文件目录    /etc/samba        //配置smb.conf前  先 备份文件

配置 需要共享那个目录,以及这个目录的访问权限

  sudo vi smb.conf   //进入编辑配置文件  在最后一行加

[linux_share]   表示增加一个新功能

Comment =My share

Path  = /home/linux/lab

Writable = yes

Browseable = yes

samba的用户权限

 sudo smbpasswd -a linux         设置windows登录密码

 sudo   /etc/init.d/ smbd restart     smb服务器重启            //init.d   是 ubuntu系统服务的前缀目录

 cd   /home/linux       进入刚才设置目录目录

 mkdir  lab     创建lab共享文件夹

  touch 123.txt   创建123.txt文件

windows客户端的访问方式

cmd:\\主机IP

 

 

打开可以看到

 

//===================================================================

另一种文件共享方法

打开我的电脑——>映射网络驱动器

 

 

 

安装Vmware Tools

点击虚拟机——》点击安装Vmware Tools等待

   cd    /media/VMware\ Tools/     进入文件目录

tar解压

  cd  /tmp/    进入tmp 

  cd   vmware-tools-distrib/ 

    sudo   ./vmware-install.pl       安装   //加上权限

    cd   /mnt      查看共享文件夹

 

//===================================================

 

 

 

发布了7 篇原创文章 · 获赞 0 · 访问量 240

Guess you like

Origin blog.csdn.net/qq_42930154/article/details/104579275