mount

制作ubuntu rootfs

ⅰ亾dé卋堺 提交于 2019-11-27 12:12:21
制作ubuntu rootfs 下载base镜像: http://cdimage.ubuntu.com/ubuntu-base/releases/16.04.1/release/ 解压: tar -zxf ubuntu-xx-base-amd64.tar.gz -C ./ubuntu-rootfs/ apt-get install qemu-user-static cp /usr/bin/qemu-amd64-static usr/bin cp -b /etc/resolv.conf etc/ #!/bin/bash # function mnt() { echo "MOUNTING" sudo mount -t proc /proc ${2}proc sudo mount -t sysfs /sys ${2}sys sudo mount -o bind /dev ${2}dev sudo mount -o bind /dev/pts ${2}dev/pts sudo chroot ${2} } function umnt() { echo "UNMOUNTING" sudo umount ${2}proc sudo umount ${2}sys sudo umount ${2}dev/pts sudo umount ${2}dev } if [ "$1" == "-m" ] &&

高薪岗位云计算面试题,云计算运维工程师必备

只愿长相守 提交于 2019-11-27 09:37:58
文章转载自: http://www.pythonheidong.com/blog/article/3323/ 云计算产业市场规模快速增长,人才需求数量激增。相关云计算企业加大对核心技术的投入,提高对客户的服务,无论从技术层面,运营商层面还是集成与服务提供层面,人才需求巨大。下面给大家分享高薪岗位云计算面试题,云计算运维工程师必备好好收藏吧。 1.osi七层参考模型有哪些? 应用层 表示层 会话层 传输层 网络层 数据链路层 物理层 2.udp协议工作在哪一层?ping工作在哪一层? UDP工作在传输层 ping 工作在网络层 3.linux系统中用于检测通信的命令有哪些?(四个以上) ping tracerroute 4.linux系统中查看硬件资源(五个以上)以及进程的命令有哪些? lspci | grep -i vga //查看显卡信息 cat /proc/cpuinfo //查看CPU信息 dmesg | grep sda //查看硬盘信息 cat /proc/meminfo //查看内存信息 dmesg | grep -i eth //查看网卡信息 ps a //显示现行终端机下的所有程序,包括其他用户的程序。 5.如何杀死僵死的进程?(三条以上) 这道题一般用不到 6.查看cpu信息的命令是什么? cat /proc/cpuinfo //查看CPU信息 7

挂载nfs提示:mount.nfs: access denied by server while mounting...

北战南征 提交于 2019-11-27 08:45:39
出现此类错误原因大致为: 权限问题 防火墙机制问题 共享配置文件问题 搭建好nfs服务后,在client端进行挂载时,提示: [root@web1 media]# mount -t nfs 192.168.0.124:/server/tools/repo /media/centos/ mount.nfs: access denied by server while mounting 192.168.0.124:/server/tools/repo 查看了一下client端是否被占用了: [root@web1 media]# mount -t nfs 192.168.0.124:/server/tools/repo /media/centos/ mount.nfs: access denied by server while mounting 192.168.0.124:/server/tools/repo [root@web1 media]# mount /dev/sda3 on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type

Linux必学的60个命令-1

跟風遠走 提交于 2019-11-27 08:28:01
Linux提供了大量的命令,利用它可以有效地完成大量的工 作,如磁盘操作、文件存取、目录操作、进程管理、文件权限设定等。所以,在Linux系统上工作离不开使用系统提供的命令。要想真正理解Linux系统, 就必须从Linux命令学起,通过基础的命令学习可以进一步理解Linux系统。 不同Linux发行版的命令数量不一样,但Linux发行版本最少的命令也有200多个。这里笔者把比较重要和使用频率最多的命令,按照它们在系统中的作用分成下面六个部分一一介绍。 ◆ 安装和登录命令:login、shutdown、halt、reboot、install、mount、umount、chsh、exit、last; ◆ 文件处理命令:file、mkdir、grep、dd、find、mv、ls、diff、cat、ln; ◆ 系统管理相关命令:df、top、free、quota、at、lp、adduser、groupadd、kill、crontab; ◆ 网络操作命令:ifconfig、ip、ping、netstat、telnet、ftp、route、rlogin、rcp、finger、mail、 nslookup; ◆ 系统安全相关命令:passwd、su、umask、chgrp、chmod、chown、chattr、sudo ps、who; ◆ 其它命令:tar、unzip、gunzip、unarj

Linux必学的60个命令1(整理后)

与世无争的帅哥 提交于 2019-11-27 08:27:36
Linux提供了大量的命令,利用它可以有效地完成大量的工 作,如磁盘操作、文件存取、目录操作、进程管理、文件权限设定等。所以,在Linux系统上工作离不开使用系统提供的命令。要想真正理解Linux系统, 就必须从Linux命令学起,通过基础的命令学习可以进一步理解Linux系统。 不同Linux发行版的命令数量不一样,但Linux发行版本最少的命令也有200多个。这里笔者把比较重要和使用频率最多的命令,按照它们在系统中的作用分成下面六个部分一一介绍。 ◆ 安装和登录命令: login、shutdown、halt、reboot、install、mount、umount、chsh、exit、last; ◆ 文件处理命令: file、mkdir、grep、dd、find、mv、ls、diff、cat、ln; ◆ 系统管理相关命令: df、top、free、quota、at、lp、adduser、groupadd、kill、crontab; ◆ 网络操作命令: ifconfig、ip、ping、netstat、telnet、ftp、route、rlogin、rcp、finger、mail、 nslookup; ◆ 系统安全相关命令: passwd、su、umask、chgrp、chmod、chown、chattr、sudo ps、who; ◆ 其它命令: tar、unzip、gunzip

十、mount挂载 swap

二次信任 提交于 2019-11-27 05:23:46
一.挂载和卸载文件系统 将额外文件系统与根文件系统某现存的目录建立起关联关系。进而使得此目录做为其它文件访问入口的行为称之为挂载 根文件系统之外的其它文件系统要想能够被访问,都必须通过“关联”至根文件系统上的某个目录来实现,此关联操作即为“挂载”;此目录即为“挂载点”; 挂载点:mount_point,用于作为另一个文件系统的访问入口; (1) 事先存在; (2) 应该使用未被或不会被其它进程使用到的目录; (3) 挂载点下原有的文件将会被隐藏; 注意:1、一个挂载点同一时间只能挂一个设备!    2、一个设备可以挂载在多个文件夹下,只不过看到的内容都是一样的    3、挂载点最好是空文件夹,否则原来的文件会被暂时隐藏,直到被卸载后才会显现出来。 1.1 mount mount [-fnrsvw] [-t vfstype] [-o options] device dir device:指明要挂载的设备; (1) 设备文件:例如/dev/sda5 (2) 卷标:-L 'LABEL', 例如 -L 'MYDATA' (3) UUID, -U 'UUID':例如 -U '0c50523c-43f1-45e7-85c0-a126711d406e' (4) 伪文件系统名称:proc, sysfs, devtmpfs, configfs dir:挂载点 事先存在;建议使用空目录

硬盘分区fdisk\gdisk ,挂载mount \swapon

人盡茶涼 提交于 2019-11-27 05:04:09
1 dd命令详解 dd:convert and copy a file dd if=/PATH/SOURCE of=/PATH/DEST bs=1[k|M] count=100 if=file,从文件读入内容。 of=offile,写入文件。 ibs=size 一次读size个byte obs=size 一次写size个byte bs=size 指定读写块大小 cbs=size 一次性转化size个大小 skip=blocks 从头忽略blocks个ibs大小的块 seek=blocks 从头忽略bolcks个obs大小的块 ////读入硬盘的MBR分区表存档备份,备份要放置在另外一块硬盘。磁盘0磁道0扇区共512bytes,446存放bootloader,64bytes分区信息,最后2bytes存放55aa,已分区标记。 [root@localhost ~]#dd if=/dev/sda of=./fstab_sda.back bs=1 count=64 skip=446 64+0 records in 64+0 records out 64 bytes (64 B) copied, 0.000452712 s, 141 kB/s [root@localhost ~]#hexdump -C fstab_sda.back 00000000 80 20 21 00 83 aa 28

How to find out mount/partition a directory or file is on? (Linux Server) [closed]

元气小坏坏 提交于 2019-11-27 04:56:51
问题 Is there a Linux command to easily find out which partition/mount a directory or file is on? (This is probably a RTM question, and I feel guilty for asking it, but somehow, I can't find a good answer on google just yet..) 回答1: df -P file/goes/here | tail -1 | cut -d' ' -f 1 来源: https://stackoverflow.com/questions/3274354/how-to-find-out-mount-partition-a-directory-or-file-is-on-linux-server

(re)mounting the SD card on android emulator

青春壹個敷衍的年華 提交于 2019-11-27 04:41:59
问题 On the emulator, I can unmount the SD card from the Settings. I can then mount it on my OS, then unmount it normally. I haven't been able to figure out how to re-mount it then on the emulator (without rebooting it). hints: the adb command remount is unrelated: it's about /system the emulator command is unrelated: it's only about starting the emulator mounting the SD card in two places of course messing everything up (I tried) more: mount outputs the following: /dev/block//vold/179:0 /sdcard

Mount SMB/CIFS share within a Docker container

最后都变了- 提交于 2019-11-27 04:03:16
I have a web application running in a Docker container. This application needs to access some files on our corporate file server (Windows Server with an Active Directory domain controller). The files I'm trying to access are image files created for our clients and the web application displays them as part of the client's portfolio. On my development machine I have the appropriate folders mounted via entries in /etc/fstab and the host mount points are mounted in the Docker container via the --volume argument. This works perfectly. Now I'm trying to put together a production container which will