LinuxRe01
Posted Silent1376
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LinuxRe01相关的知识,希望对你有一定的参考价值。
一、三种网络模式
https://www.bilibili.com/video/BV1Sv411r7vd?p=7
1、桥接模式
该虚拟机和宿主机同一网段,和外部网络相通,但是占用网段地址资源,IP分配有限
2、NAT模式
建立了独立网路IP地址,通过宿主机代理访问外部网路,非宿主同一网段
但是外部网络无法访问该虚拟机
3、主机模式
独立的操作系统
二、VmTool 文件共享
只安装终端方式的VM已经把工具弄好了
然后实现文件共享只需要把宿主机的目录挂载出来
在Linux的挂载目录在这里:
/mnt/hgfs/share-doc
share-doc是共享的目录名
在linux这个目录中编辑一个新文件,在宿主机windows这里也会出现对应的新文件
[root@localhost hgfs]# cd share-doc [root@localhost share-doc]# vim aa.txt [root@localhost share-doc]#
三、目录结构:
[root@localhost /]# ll 总用量 20 lrwxrwxrwx. 1 root root 7 11月 28 10:40 bin -> usr/bin dr-xr-xr-x. 5 root root 4096 11月 29 10:17 boot drwxr-xr-x. 20 root root 3260 11月 29 10:23 dev drwxr-xr-x. 82 root root 8192 11月 29 10:44 etc drwxr-xr-x. 2 root root 6 4月 11 2018 home lrwxrwxrwx. 1 root root 7 11月 28 10:40 lib -> usr/lib lrwxrwxrwx. 1 root root 9 11月 28 10:40 lib64 -> usr/lib64 drwxr-xr-x. 2 root root 6 4月 11 2018 media drwxr-xr-x. 3 root root 18 11月 28 12:13 mnt drwxr-xr-x. 3 root root 16 11月 29 10:44 opt dr-xr-xr-x. 153 root root 0 11月 29 10:23 proc dr-xr-x---. 2 root root 199 11月 29 10:36 root drwxr-xr-x. 25 root root 740 11月 29 10:44 run lrwxrwxrwx. 1 root root 8 11月 28 10:40 sbin -> usr/sbin drwxr-xr-x. 2 root root 6 4月 11 2018 srv dr-xr-xr-x. 13 root root 0 11月 29 10:23 sys drwxrwxrwt. 14 root root 4096 11月 29 10:44 tmp drwxr-xr-x. 13 root root 155 11月 28 10:40 usr drwxr-xr-x. 19 root root 267 11月 28 10:54 var
/bin目录 binary缩写,存放经常使用的命令脚本,我们所写的命令其实也是基于这些脚本文件实现的
[root@localhost /]# ls /bin [ cksum dwp gio-querymodules-64 infocmp luac nl-addr-list perl rename sg shuf teamnl vmware-checkvm a2p clean-binary-files echo glib-compile-schemas infokey lz4 nl-class-add perl5.16.3 renice sg_compare_and_write signver tee vmware-hgfsclient abs2rel clear egrep gmake infotocap lz4c nl-class-delete perlbug rescan-scsi-bus.sh sg_copy_results size test vmware-namespace-cmd addr2line cmp eject gneqn install lz4cat nl-classid-lookup perldoc reset sg_dd skill testgdbm vmware-rpctool alias cmsutil elfedit gnroff ionice machinectl nl-class-list perlthanks resizecons sg_decode_sense slabinfo tic vmware-toolbox-cmd alt-java col env gpasswd ipcalc mailq nl-cls-add pflags rev sg_emc_trespass slabtop timedatectl vmware-vgauth-cmd apropos colcrt envsubst gpg ipcmk mailq.postfix nl-cls-delete pgawk rm sg_format sleep timeout vmware-xferlogs ar colrm eqn gpg2 ipcrm make nl-cls-list pgrep rmail sg_get_config slogin tload vxloader arch column ex gpg-agent ipcs makedb nl-fib-lookup pic rmail.postfix sg_get_lba_status snice tmon w as comm expand gpgconf iptables-xml man nl-link-enslave piconv rmdir sg_ident soelim tnameserv wait aserver command expr gpg-connect-agent isosize mandb nl-link-ifindex2name pinentry rmid sginfo sort toe wall audit2allow coredumpctl factor gpg-error java manpath nl-link-list pinentry-curses rmiregistry sg_inq sotruss top watch audit2why cp fallocate gpgparsemail jjs mapscrn nl-link-name2ifindex ping rpcgen sg_logs splain touch watchgnupg aulast cpio false gpgsplit jobs mcookie nl-link-release ping6 rpm sg_luns split tput wc aulastlog cpp fc gpgv join md5sum nl-link-set pinky rpm2cpio sg_map sprof tr wdctl ausyscall cpupower fc-cache gpgv2 journalctl mesg nl-link-stats pk12util rpmdb sg_map26 sqlite3 tracepath wget auvirt create-jar-links fc-cache-64 gpg-zip jvmjar mixartloader nl-list-caches pkaction rpmkeys sgm_dd ssh tracepath6 whatis awk crlutil fc-cat gpic kbdinfo mkdir nl-list-sockets pkcheck rpmquery sg_modes ssh-add troff whereis base64 crontab fc-conflist gprof kbd_mode mkfifo nl-monitor pkexec rpmverify sg_opcodes ssh-agent true which basename csplit fc-list gr2fonttest kbdrate mkfontdir nl-neigh-add pkg-config rsyslog-recover-qi.pl sgp_dd ssh-copy-id truncate whiptail bash csslint-0.6 fc-match grep kdumpctl mkfontscale nl-neigh-delete pkill runcon sg_persist ssh-keygen trust who bashbug curl fc-pattern groff kernel-install mkinitrd nl-neigh-list pkla-admin-identities run-parts sg_prevent ssh-keyscan tset whoami bashbug-64 cut fc-query grops keytool mknod nl-neightbl-list pkla-check-authorization rvi sg_raw ssltap tsort withsctp bc cvtsudoers fc-scan grotty kill mktemp nl-pktloc-lookup pkttyagent rview sg_rbuf stat ttmkfdir write bdftopcf date fc-validate groups kmod modutil nl-qdisc-add pl2pm rvim sg_rdac stdbuf tty x86_64 bdftruncate db_archive fg grub2-editenv last more nl-qdisc-delete pldd s2p sg_read strings turbostat x86_64-redhat-linux-gcc bg db_checkpoint fgconsole grub2-file lastb mount nl-qdisc-list plymouth sandbox sg_read_block_limits strip tzselect x86_energy_perf_policy bond2team db_deadlock fgrep grub2-fstest lastlog mountpoint nl-route-add pmap scl sg_read_buffer stty ucs2any xargs bootctl db_dump file grub2-glue-efi lchfn msgattrib nl-route-delete pod2html scl_enabled sg_readcap su udevadm xgettext build-classpath db_dump185 find grub2-kbdcomp lchsh msgcat nl-route-get pod2man scl_source sg_read_long sudo ul xmlcatalog build-classpath-directory db_hotbackup find2perl grub2-menulst2cfg ld msgcmp nl-route-list pod2text scp sg_reassign sudoedit ulockmgr_server xmllint build-jar-repository db_load find-jar grub2-mkfont ld.bfd msgcomm nl-rule-list pod2usage script sg_referrals sudoreplay umask xmlsec1 busctl db_log_verify findmnt grub2-mkimage ldd msgconv nl-tctree-list policytool scriptreplay sg_requests sum umount xmlwf c2ph db_printlog fipscheck grub2-mklayout ld.gold msgen nl-util-addr post-grohtml scsi_logging_level sg_reset sync unalias xmvn-builddep c89 db_recover fipshmac grub2-mknetdir less msgexec nm powernow-k8-decode scsi_mandat sg_rmsn systemctl uname xorg-x11-fonts-update-dirs c99 db_replicate firewall-cmd grub2-mkpasswd-pbkdf2 lessecho msgfilter nmcli pr scsi_readcap sg_rtpg systemd-analyze unexpand xsltproc cairo-sphinx db_stat firewall-offline-cmd grub2-mkrelpath lesskey msgfmt nm-online preconv scsi_ready sg_safte systemd-ask-password unicode_start xxd cal db_tuner flock grub2-mkrescue lesspipe.sh msggrep nmtui pre-grohtml scsi-rescan sg_sanitize systemd-cat unicode_stop xz ca-legacy db_upgrade fmt grub2-mkstandalone lexgrog msghack nmtui-connect printenv scsi_satl sg_sat_identify systemd-cgls uniq xzcat captoinfo dbus-binding-tool fold grub2-render-label link msginit nmtui-edit printf scsi_start sg_sat_phy_event systemd-cgtop unlink xzcmp cat dbus-cleanup-sockets fonttosfnt grub2-script-check linux32 msgmerge nmtui-hostname prlimit scsi_stop sg_sat_set_features systemd-coredumpctl unlz4 xzdec catchsegv dbus-daemon free grub2-syslinux2cfg linux64 msgunfmt nohup ps scsi_temperature sg_scan systemd-delta unpack200 xzdiff catman dbus-monitor fribidi gsettings linux-boot-prober msguniq nproc psed sctp_darn sg_senddiag systemd-detect-virt unshare xzegrep cc dbus-run-session fusermount gsoelim ln mv nroff psfaddtable sctp_status sg_ses systemd-escape unxz xzfgrep cd dbus-send gapplication gtar loadkeys namei nsenter psfgettable sctp_test sg_start systemd-firstboot update-ca-trust xzgrep centrino-decode dbus-test-tool gawk gtbl loadunimap ndptool nss-policy-check psfstriptable sdiff sg_stpg systemd-hwdb update-gtk-immodules xzless certutil dbus-update-activation-environment gcc gtk-query-immodules-2.0-64 locale neqn numfmt psfxtable secon sg_sync systemd-inhibit update-mime-database xzmore c++filt dbus-uuidgen gcc-ar gtk-update-icon-cache localectl newaliases objcopy pstruct sed sg_test_rwbuf systemd-loginctl uptime yes chacl db_verify gcc-nm gtroff localedef newaliases.postfix objdump ptaskset sedismod sg_turs systemd-machine-id-setup urlgrabber ypdomainname chage dc gcc-ranlib gunzip logger newgidmap od ptx sedispol sg_unmap systemd-notify users yum chattr dd gcov gzexe login newgrp oldfind pwd semodule_package sg_verify systemd-nspawn usleep zcat chcat deallocvt gdbus gzip loginctl newuidmap open pwdx seq sg_vpd systemd-path usx2yloader zcmp chcon df gdk-pixbuf-query-loaders-64 h2ph logname nf-ct-add openssl pwmake servertool sg_write_buffer systemd-run utmpdump zdiff check-binary-files dgawk gdk-pixbuf-thumbnailer hdsploader look nf-ct-list openvt pwscore setarch sg_write_long systemd-stdio-bridge uuidgen zegrep checkmodule diff gencat head ls nf-exp-add orbd pydoc setfacl sg_write_same systemd-sysv-convert vdir zfgrep checkpolicy diff3 genl-ctrl-list hexdump lsattr nf-exp-delete os-prober python setfont sg_wr_mode systemd-tmpfiles VGAuthService zforce checksctp diff-jars geqn hostid lsblk nf-exp-list p11-kit python2 setkeycodes sg_xcopy systemd-tty-ask-password-agent vi zgrep chfn dir getconf hostname lscpu nf-log pack200 python2.7 setleds sh tabs view zless chgrp dircolors getent hostnamectl lsinitrd nf-monitor page_owner_sort ranlib setmetamode sha1sum tac vim zmore chmem dirname getfacl i386 lsipc nf-queue pango-list raw setpriv sha224sum tail vimdiff znew chmod dmesg getkeycodes iconv lslocks ngettext pango-querymodules-64 read setsid sha256sum tailf vimtutor zsoelim chown dnsdomainname getopt id lslogins nice pango-view readelf setterm sha384sum tar vlock chronyc domainname getopts idiag-socket-details lsmem nisdomainname passwd readlink setup-nsssysinit sha512sum taskset vmhgfs-fuse chrt dracut gettext idn lsns nl paste realpath setup-nsssysinit.sh showconsolefont tbl vmstat chsh du gettext.sh igawk lsscsi nl-addr-add pathchk rebuild-jar-repository setvtrgb showkey teamd vm-support chvt dumpkeys gio info lua nl-addr-delete pchrt recode-sr-latin sftp shred teamdctl vmtoolsd
/sbin目录s意思superUser超级用户,存放超级管理员使用的管理程序,权限控制与安全管理相关
[root@localhost /]# ls /sbin accessdb bridge chroot e2image fsck.minix grub2-probe iprdbg lshw matchpathcon nl-cls-delete postfix resize2fs semodule telinit vgck xfs_admin addgnupghome btrfs clock e2label fsck.xfs grub2-reboot iprdump lsmod mkdict nl-cls-list postkick resizepart sendmail thin_check vgconvert xfs_bmap addpart btrfsck clockdiff e2undo fsfreeze grub2-rpm-sort iprinit lspci mkdumprd nl-link-list postlock restorecon sendmail.postfix thin_delta vgcreate xfs_copy adduser btrfs-convert consoletype e4defrag fstrim grub2-set-default iprsos luseradd mke2fs nl-pktloc-lookup postlog rmmod service thin_dump vgdisplay xfs_db agetty btrfs-debug-tree cracklib-check eapol_test fxload grub2-setpassword iprupdate luserdel mkfs nl-qdisc-add postmap routef sestatus thin_ls vgexport xfs_estimate alternatives btrfs-find-root cracklib-format ebtables genhomedircon grub2-sparc64-setup ipset lusermod mkfs.btrfs nl-qdisc-delete postmulti routel setcap thin_metadata_size vgextend xfs_freeze anacron btrfs-image cracklib-packer ebtables-restore genhostid grubby iptables lvchange mkfs.cramfs nl-qdisc-list postqueue rsyslogd setenforce thin_repair vgimport xfs_fsr applygnupgdefaults btrfs-map-logical cracklib-unpacker ebtables-save genl halt iptables-restore lvconvert mkfs.ext2 nologin postsuper rtacct setfiles thin_restore vgimportclone xfs_growfs arpd btrfs-select-super create-cracklib-dict era_check genl-ctrl-list hardlink iptables-save lvcreate mkfs.ext3 nstat poweroff rtcwake setpci thin_rmap vgmerge xfs_info arping btrfstune crond era_dump getcap hwclock irqbalance lvdisplay mkfs.ext4 ownership ppp-watch rtmon setsebool thin_trim vgmknodes xfs_io audispd btrfs-zero-log ctrlaltdel era_invalidate getenforce iconvconfig kexec lvextend mkfs.minix packer pvchange rtpr sfdisk tracepath vgreduce xfs_logprint auditctl build-locale-archive ctstat era_restore getpcaps iconvconfig.x86_64 killall5 lvm mkfs.xfs pam_console_apply pvck rtstat shutdown tracepath6 vgremove xfs_mdrestore auditd cacertdir_rehash debugfs ethtool getsebool ifcfg kpartx lvmconf mkhomedir_helper pam_tally2 pvcreate runlevel sln tune2fs vgrename xfs_metadump augenrules cache_check delpart faillock glibc_post_upgrade.x86_64 ifdown lchage lvmconfig mklost+found pam_timestamp_check pvdisplay runuser smtp-sink tuned vgs xfs_mkfile aureport cache_dump depmod fdformat groupadd ifenslave ldattach lvmdiskscan mkswap parted pvmove sasldblistusers2 smtp-source tuned-adm vgscan xfs_ncheck ausearch cache_metadata_size devlink fdisk groupdel ifstat ldconfig lvmdump modinfo partprobe pvremove saslpasswd2 ss udevadm vgsplit xfs_quota authconfig cache_repair dhclient filefrag groupmems ifup lgroupadd lvmetad modprobe partx pvresize sefcontext_compile sshd unix_chkpwd vigr xfs_repair authconfig-tui cache_restore dhclient-script findfs groupmod init lgroupdel lvmpolld mount.fuse pdata_tools pvs selabel_digest sshd-keygen unix_update vipw xfs_rtcp autrace cache_writeback dmeventd firewalld grpck insmod lgroupmod lvmsadc netreport pidof pvscan selabel_lookup sulogin update-alternatives virt-what xtables-multi avcstat capsh dmfilemapd fixfiles grpconv install-info lid lvmsar NetworkManager ping6 pwck selabel_lookup_best_match sushell update-pciids visudo zdump badblocks cbq dmidecode fsadm grpunconv installkernel lnewusers lvreduce new-kernel-pkg pivot_root pwconv selabel_partial_match swaplabel useradd vmcore-dmesg zic biosdecode cfdisk dmsetup fsck grub2-bios-setup intel-microcode2ucode lnstat lvremove newusers plymouthd pwhistory_helper selinuxconlist swapoff userdel vpddecode zramctl biosdevname chcpu dmstats fsck.btrfs grub2-get-kernel-settings ip load_policy lvrename nl-class-add plymouth-set-default-theme pwunconv selinuxdefcon swapon usermod weak-modules blkdeactivate chgpasswd dracut fsck.cramfs grub2-install ip6tables logrotate lvresize nl-class-delete postalias rdisc selinuxenabled switch_root usernetctl wipefs blkdiscard chkconfig dumpe2fs fsck.ext2 grub2-macbless ip6tables-restore logsave lvs nl-classid-lookup postcat rdma selinuxexeccon sysctl vgcfgbackup wpa_cli blkid chpasswd e2freefrag fsck.ext3 grub2-mkconfig ip6tables-save losetup lvscan nl-class-list postconf readprofile selinux_restorecon sys-unconfig vgcfgrestore wpa_passphrase blockdev chronyd e2fsck fsck.ext4 grub2-ofpathname iprconfig lpasswd makedumpfile nl-cls-add postdrop reboot semanage tc vgchange wpa_supplicant
/home存放是其他用户的目录,每个用户名的目录由它的用户名称决定
[root@localhost /]# cd /home [root@localhost home]# ls [root@localhost home]# useradd user-01 [root@localhost home]# useradd user-02 [root@localhost home]# useradd user-03 [root@localhost home]# useradd user-04 [root@localhost home]# ls user-01 user-02 user-03 user-04
/usr目录存放应用程序和文件,类似windows的programfiles
[root@localhost /]# ls /usr bin etc games include lib lib64 libexec local sbin share src tmp
/boot目录存放系统启动需要的相关文件
[root@localhost /]# ls /boot config-3.10.0-1127.el7.x86_64 initramfs-3.10.0-1127.el7.x86_64.img System.map-3.10.0-1127.el7.x86_64 config-3.10.0-1160.6.1.el7.x86_64 initramfs-3.10.0-1127.el7.x86_64kdump.img System.map-3.10.0-1160.6.1.el7.x86_64 efi initramfs-3.10.0-1160.6.1.el7.x86_64.img vmlinuz-0-rescue-8cd9a0197dc14da38e07eed4a07ce8c6 grub initramfs-3.10.0-1160.6.1.el7.x86_64kdump.img vmlinuz-3.10.0-1127.el7.x86_64 grub2 symvers-3.10.0-1127.el7.x86_64.gz vmlinuz-3.10.0-1160.6.1.el7.x86_64 initramfs-0-rescue-8cd9a0197dc14da38e07eed4a07ce8c6.img
/proc目录映射系统内存,访问这个目录获取系统信息
改变该目录的文件可能会造成系统崩溃
[root@localhost /]# ls /proc 1 1389 19 28 3017 32 36 410 432 541 61 653 680 746 acpi diskstats irq mdstat sched_debug sysvipc 10 1390 1966 2806 304 320 3621 411 433 550 62 655 681 757 asound dma kallsyms meminfo schedstat timer_list 11 14 2 2807 31 321 37 424 434 57 63 668 7 762 buddyinfo driver kcore misc scsi timer_stats 1118 16 21 2824 311 3288 38 425 435 574 64 669 704 766 bus execdomains keys modules self tty 1120 1639 22 2829 312 33 39 426 46 575 647 674 728 78 cgroups fb key-users mounts slabinfo uptime 1121 1645 2241 29 313 333 398 427 47 576 648 675 729 8 cmdline filesystems kmsg mpt softirqs version 115 17 2257 299 314 34 399 428 48 578 649 676 730 804 consoles fs kpagecount mtrr stat vmallocinfo 12 1781 23 30 315 3459 4 429 49 59 650 677 733 883 cpuinfo interrupts kpageflags net swaps vmstat 13 1786 24 300 316 35 40 430 515 6 651 678 734 9以上是关于LinuxRe01的主要内容,如果未能解决你的问题,请参考以下文章