• Android’s dad: Linux
  • Dad’s Github This one is real Dad, hats off to Dad: Linus Torvalds

history

  • Is a free and open source Unix-like operating system. The kernel of the operating system was first released by Linus Torvalds on October 5, 1991. [4][5], with the addition of user-space applications, became the Linux operating system. Linux is also the best-known example of free and open source software development. Any person or organization is free to use, modify and redistribute all of Linux’s underlying source code as long as it complies with the GNU General Public License (GPL). Most Linux systems also include programs like X Window, which provides a GUI. With the exception of a few specialists, most people use Linux distributions directly, rather than choosing each component or setting it up themselves.

  • Linux strictly refers to the kernel of the operating system, because the operating system contains many user graphical interfaces and other utilities. Linux is now commonly used to refer to a complete operating system based on Linux, while the kernel has been renamed the Linux kernel. Since these system tools and libraries supporting user space are mainly provided by the GNU Project launched by Richard Stallman in 1983, the Free Software Foundation proposed to name the combined system GNU/Linux[6][7], but Linux is not part of the GNU Project and the name has not been agreed upon by the community.

  • Linux began as a free operating system for personal computers that supported Intel’s x86 architecture. Linux has been ported to more computer hardware platforms than any other operating system. Linux can run on servers and other large platforms, such as mainframe computers and supercomputers. More than 90% of the 500 fastest supercomputers in the world run Linux distributions or variants [8], including the top 10 fastest supercomputers running Linux kernel-based operating systems [9]. Linux is also widely used on embedded systems such as Mobile phones, tablets, routers, TVS, and video games. The Android operating system, widely used on mobile devices, is built on top of the Linux kernel.

Linux is typically packaged as a Linux distribution for PCS and servers, and some popular mainstream Linux distributions, These include Debian (and its derivatives Ubuntu, Linux Mint), Fedora (and their related versions Red Hat Enterprise Linux, CentOS), and openSUSE. Linux distributions contain the Linux kernel and the utilities and libraries that support it, often with a large number of applications that can meet a variety of needs. Linux distributions for personal computers typically include X Window and a corresponding desktop environment, such as GNOME or KDE. Common Linux desktop applications include The Firefox web browser, LibreOffice, and GIMP image processing tool. Since Linux is free software, anyone can create a Linux distribution that matches their needs.

positive

  • Open source Linux allows knowledge to continue, enabling new software companies to build expertise quickly and cheaply from open source, enriching competition in the marketplace and preventing monopolistic software behemoths.
  • There are few copyright issues for personal use, and most are free to use, with almost no piracy issues.
  • Most of the new Linux distributions come with a server service that automatically downloads and installs certified software with one click, rather than having to buy and install it from the market.
  • The investment in Linux learning takes longer. The old version of the software, the system is still there, there are source code can be derived, branch, maintenance cycle is generally much longer than Windows. Even if abandoned, it can still be derived from source code. New software updates and variations tend to make it easier for users to get used to principles rather than habits.
  • Powerful Shell and script support, easy to combine to match the needs of the environment or create automatic programs.
  • The default security Settings are much more secure than the current mainstream Windows operating system. [47] The Windows operating system reduces the default security Settings for non-professional users, which makes the system vulnerable to Trojan horses and viruses. Pirated Windows is even worse. It may be bundled with pirated operating systems with Trojan horses and malicious programs, some default super users (Administrator) login, and security updates are turned off, resulting in worse security.

negative

  • BSD developers have criticized Linux kernel developers for putting too much emphasis on adding new features rather than getting code written and organized.
  • Minix enthusiasts see microkernels as the future of technology, and Linux as technologically antiquated. (See the Tannenbaum-Linus debate.)
  • The software and hardware support is poor. Most software and hardware manufacturers do not or do not give priority to developing Linux versions, or Linux versions have few features, resulting in poor application programs and hardware peripheral support compared with Windows and Mac.
  • There are a significant number of distributions (more than 200) that make it impossible for developers to test against all distributions, and applications installed on a non-mainstream distribution using the Linux platform may encounter unexpected problems or even become unusable.
  • Linux system and related application software is mainly developed by hackers and other programmers and Linux enthusiasts, so there is no commercial software based on commercial interests to adjust the operation interface to make it more suitable for different user behavior. Users are not used to Linux and lack consistency in different software operation modes, which makes the Linux system difficult to use.

Linux System directory Structure (Based on company server)

  • ls/ bin boot data dev etc home lib lib64 lost+found media mnt nohup.out opt proc root run sbin srv sys tmp usr var

  • Bin, short for Binary, is the directory that houses the most frequently used commands.

The command of SZ is to download the JAR package, which is generally dependent on the project. The architect will type the JAR package, we do not have the permission to see it. Then I will download it and decompile it

  • Boot: Stores some core files used to start Linux, including some connection files and image files.
[dev@dev-lhn1d-retail-api1 /]$ cdBoot [dev@dev-lhn1d-retail-api1 boot]$ls config-3.10.0-693.2.2.el7.x86_64 grub initramfs-3.10.0-693.2.2.el7.x86_64.img Initramfs - 3.10.0-693. El7. X86_64kdump. Img symvers - 3.10.0-693. El7. X86_64. Gz called - 0 - rescue-f0 f31005fb5a436d88e3c6cbf54e25aa config - 3.10.0-693. El7. X86_64 grub2 initramfs - 3.10.0-693.2.2. El7. X86_64kdump. Img Initrd-cranies.img system.map-3.10.0-693.2.2.el7.x86_64 vmlinuz-3.10.0-693.2.2.el7.x86_64 efI initramfs-0-rescue-f0 f31005fb5a436d88e3c6cbf54e25aa. Img initramfs - 3.10.0-693. El7. X86_64. Img symvers - 3.10.0-693.2.2. El7. X86_64. Gz System. The map - 3.10.0-693. El7. X86_64 called - 3.10.0-693. El7. X86_64 [dev @ dev - lhn1d - retail - api1 boot] $Copy the code
  • Data: This directory is our server’s own directory, I feel like a pile of files
[dev@dev-lhn1d-retail-api1 home]$ cd /
[dev@dev-lhn1d-retail-api1 /]$ ls
bin  boot  data  dev  etc  home  lib  lib64  lost+found  media  mnt  nohup.out  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
[dev@dev-lhn1d-retail-api1 /]$ cd data
[dev@dev-lhn1d-retail-api1 data]$ ls
www  wxcert
[dev@dev-lhn1d-retail-api1 data]$ cdWWW [dev@dev-lhn1d-retail-api1 WWW]$ls retail-admin_v0.0.3 retail- admin_v0.11.10a01_20181121 Retail - admin_V0. 11.3 A01_20181119 retail - admin_V0. 11.9 A01_20181121 retail - admin_V0. 7.1 A01_20181109 Retail - admin_V0. 9.1 A01_20181114 retail - admin_V0. 0.3. Tar. Gz retail - admin_V0. 11.10 A01_20181121. Tar. Gz Retail - admin_V0. 11.3 A01_20181119. Tar. Gz retail - admin_V0. 11.9 A01_20181121. Tar. Gz retail - admin_V0. 7.1 A01_20181109. Tar. Gz Retail - admin_V0. 9.1 A01_20181114. Tar. Gz retail - admin_V0. Retail - admin_V0. 0.4 11.11 A01_20181121 Retail - admin_V0. 11.4 A01_20181120 retail - admin_V0. 12.0 A01_20181121 retail - admin_V0. 7.2 A01_20181109 Retail - admin_V0. 9.2 A01_20181114 retail - admin_V0. 0.4. Tar. Gz retail - admin_V0. 11.11 A01_20181121. Tar. Gz Retail - admin_V0. 11.4 A01_20181120. Tar. Gz retail - admin_V0. 12.0 A01_20181121. Tar. Gz retail - admin_V0. 7.2 A01_20181109. Tar. Gz Retail - admin_V0. 9.2 A01_20181114. Tar. Gz retail - admin_V0. Retail - admin_V0. 0.5 11.12 A01_20181122 Retail - admin_V0. 11.5 A01_20181120 retail - admin_V0. 6.0 A01_20181109 retail - admin_V0. 8.0 A01_20181114 Retail - admin_V0. 9.3 A01_20181116 retail - admin_V0. 0.5. Tar. Gz retail - admin_V0. 11.12 A01_20181122. Tar. Gz Retail - admin_V0. 11.5 A01_20181120. Tar. Gz retail - admin_V0. 6.0 A01_20181109. Tar. Gz retail - admin_V0. 8.0 A01_20181114. Tar. Gz Retail - admin_V0. 9.3 A01_20181116. Tar. Gz retail - admin_V0. Retail - admin_V0. 0.6 11.13 A01_20181122 Retail - admin_V0. 11.6 A01_20181120 retail - admin_V0. 6.1 A01_20181113 retail - admin_V0. 8.1 A01_20181114 retailWeb Retail - admin_V0. 0.6. Tar. Gz retail - admin_V0. 11.13 A01_20181122. Tar. Gz retail - admin_V0. 11.6 A01_20181120. Tar. Gz Retail - admin_V0. 6.1 A01_20181113. Tar. Gz retail - admin_V0. 8.1 A01_20181114. Tar. Gz retail - admin_V0. 1.0 Retail - admin_V0. 11.1 A01_20181119 retail - admin_V0. 11.7 A01_20181121 retail - admin_V0. 6.2 A01_20181109 Retail - admin_V0. 8.2 A01_20181114 retail - admin_V0. 10.0 A01_20181116 retail - admin_V0. 11.1 A01_20181119. Tar. Gz Retail - admin_V0. 11.7 A01_20181121. Tar. Gz retail - admin_V0. 6.2 A01_20181109. Tar. Gz retail - admin_V0. 8.2 A01_20181114. Tar. Gz Retail - admin_V0. 10.0 A01_20181116. Tar. Gz retail - admin_V0. 11.2 A01_20181119 retail - admin_V0. 11.8 A01_20181121 Retail - admin_V0. 7.0 A01_20181109 retail - admin_V0. 9.0 A01_20181114 retail - admin_V0. 1.0. Tar. Gz Retail - admin_V0. 11.2 A01_20181119. Tar. Gz retail - admin_V0. 11.8 A01_20181121. Tar. Gz retail - admin_V0. 7.0 A01_20181109. Tar. Gz Retail - admin_V0. 9.0 A01_20181114. Tar. GzCopy the code
  • Dev: Dev is short for Device. This directory stores Linux external devices. In Linux, the way to access devices is the same as the way to access files.
[dev@dev-lhn1d-retail-api1 /]$ cddev [dev@dev-lhn1d-retail-api1 dev]$ ls autofs console disk fuse initctl mapper network_latency port raw snd tty0 tty13 tty18 tty22 tty27 tty31 tty36 tty40 tty45 tty5 tty54 tty59 tty63 ttyS1 urandom vcs2 vcsa vcsa5 vga_arbiter zero block core dri hidraw0 input mcelog network_throughput ppp rtc stderr tty1 tty14 tty19 tty23 tty28 tty32 tty37 tty41 tty46 tty50 tty55 tty6 tty7 ttyS2 usbmon0 vcs3 vcsa1 vcsa6 vhci btrfs-control cpu fb0 hpet kmsg mem null ptmx rtc0 stdin tty10  tty15 tty2 tty24 tty29 tty33 tty38 tty42 tty47 tty51 tty56 tty60 tty8 ttyS3 usbmon1 vcs4 vcsa2 vda vhost-net bus cpu_dma_latency fd hugepageslog           mqueue  nvram               pts     shm       stdout  tty11  tty16  tty20  tty25  tty3   tty34  tty39  tty43  tty48  tty52  tty57  tty61  tty9   uhid    vcs      vcs5  vcsa3  vda1   virtio-ports
char           crash            full  hwr

Copy the code
  • Etc: This directory is used to store all configuration files and subdirectories required by system management.
[dev@dev-lhn1d-retail-api1 /]$ cdetc [dev@dev-lhn1d-retail-api1 etc]$ ls adjtime centos-release-upstream csh.login ethertypes group- iproute2 localtime motd os-release profile redhat-release sestatus.conf sudo-ldap.conf virc aliases chkconfig.d dbus-1 exports grub2.cfg issue login.defs mtab pam.d profile.d resolv.conf shadow sysconfig wgetrc aliases.db chrony.conf default favicon.png grub.d issue.net logrotate.conf my.cnf passwd protocols rpc shadow- sysctl.conf wpa_supplicant alternatives chrony.keys depmod.d filesystems gshadow kdump.conf logrotate.d my.cnf.d passwd- python rpm shells sysctl.d X11 anacrontab cloud dhcp firewalld gshadow- kernel lsb-release.d NetworkManager pkcs11 rc0.d rsyncd.conf skel systemd xdg asound.conf cron.d  DIR_COLORS fonts gss krb5.conf machine-id networks pki rc1.d rsyslog.conf ssh system-release xinetd.d at.deny cron.daily DIR_COLORS.256color fstab host.conf krb5.conf.d machine-info nginx plymouth rc2.d rsyslog.d ssl system-release-cpe yum audisp cron.deny DIR_COLORS.lightbgcolor gcrypt hostname ld.so.cache magic nscd.conf pm rc3.d rwtab statetab terminfo yum.conf audit cron.hourly dracut.conf GeoIP.conf hosts ld.so.conf mail.rc nsswitch.conf polkit-1 rc4.d rwtab.d statetab.d timezone yum.repos.d backup cron.monthly dracut.conf.d GeoIP.conf.default hosts.allow ld.so.conf.d makedumpfile.conf.sample nsswitch.conf.bak popt.d rc5.d sasl2 subgid tmpfiles.d bash_completion.d crontab dracut.conf.d? gnupg hosts.deny libaudit.conf man_db.conf ntp postfix rc6.d securetty subuid tuned bashrc cron.weekly e2fsck.conf GREP_COLORS init.d libnl mke2fs.conf ntp.conf ppp rc.d security sudo.conf udev binfmt.d crypttab eni_utils groff inittab libuser.conf modprobe.d openldap prelink.conf.d rc.local selinux sudoers vconsole.conf centos-release csh.cshrc environment group inputrc locale.conf modules-load.d opt printcap redhat-lsb services sudoers.d vimrc [dev@dev-lhn1d-retail-api1 etc]$Copy the code
  • Home: The user’s home directory. In Linux, each user has a directory named after the user’s account.
[dev@dev-lhn1d-retail-api1 /]$ cd home
[dev@dev-lhn1d-retail-api1 home]$ ls
dev  oper  ops
[dev@dev-lhn1d-retail-api1 home]$ 
Copy the code
  • Lib: This directory contains the system’s most basic dynamic connection shared library, which functions like DLL files in Windows. Almost all applications need these shared libraries.
[dev@dev-lhn1d-retail-api1 /]$ cdLib [dev@dev-lhn1d-retail-api1 lib]$ls binfmt.d CPP dracut firmware GCC KBD kernel LSB modules NetworkManager python2.7  sendmail sse2 systemd tuned yum-plugins cloud-init debug firewalld games grub kdump locale modprobe.d modules-load.d polkit-1 rpm sendmail.postfix sysctl.d tmpfiles.d udev [dev@dev-lhn1d-retail-api1 lib]$Copy the code
  • Lib64: directory for storing library files

  • Lost +found: This directory is usually empty and contains files when the system is shut down illegally. (I don’t have permission to do this)

[dev@dev-lhn1d-retail-api1 /]$ cd lost+found
-bash: cd: lost+found: Permission denied
[dev@dev-lhn1d-retail-api1 /]$ 

Copy the code
  • Media: The Linux system automatically identifies some devices, such as USB flash drives and CD/DVD-ROM drives. After identifying the devices, Linux will mount them to this directory. It is currently an empty folder
[dev@dev-lhn1d-retail-api1 /]$ cd media
[dev@dev-lhn1d-retail-api1 media]$ ls
[dev@dev-lhn1d-retail-api1 media]$ 

Copy the code
  • MNT: this directory is provided by the system to allow users to temporarily mount other file systems. You can mount the CD-ROM drive to/MNT/and then go to this directory to view the contents of the cd-rom drive.
[dev@dev-lhn1d-retail-api1 /]$ cd mnt
[dev@dev-lhn1d-retail-api1 mnt]$ ^C
[dev@dev-lhn1d-retail-api1 mnt]$ 

Copy the code
  • Nohup. Out: a file, which is a JAR package
[dev@dev-lhn1d-retail-api1 /]$ cd nohup.out
-bash: cd: nohup.out: Not a directory [dev@dev-lhn1d-retail-api1 /]$ tailf nohup.out Error: Unable to access jarfile /opt/newretail_services/blissmall-baseinfo/blissmall-baseinfo.jar ^C [dev@dev-lhn1d-retail-api1  /]$ ls bin boot data dev etc home lib lib64 lost+found media mnt nohup.out opt proc root run sbin srv sys tmp usr var [dev@dev-lhn1d-retail-api1 /]$ tail -fn 50 nohup.out Error: Unable to access jarfile /opt/newretail_services/blissmall-baseinfo/blissmall-baseinfo.jarCopy the code
  • Opt: This is the directory for installing additional software on the host. For example, if you install an ORACLE database, you can put it in this directory. The default is empty. All executing jars are in this directory
[dev@dev-lhn1d-retail-api1 /]$ cdOpt [dev@dev-lhn1d-retail-api1 opt]$ls apache-maven-3.5.4-bin.tar.gz jdK-8U181-linux-x64.tar. gz newRETAIL_services settings sh [dev@dev-lhn1d-retail-api1 opt]$cd newretail_services/
[dev@dev-lhn1d-retail-api1 newretail_services]$ ls
blissmall-eureka  blissmall-gateway  retail-activity  retail-auth-center  retail-baseinfo  retail-demo  retail-logistics  retail-members  retail-mmc  retail-pay  retail-produce  retail-product  retail-shop  retail-trade  retail-uc

Copy the code
  • Tree tree command, the package under all the files and folders listed tree structure, only list the structure of a tree, I am responsible for the logistics module structure.
├ ─ ─ retail - logistics │ ├ ─ ─ the config - cache │ │ ├ ─ ─ retail logistics + + application. The default properties │ │ └ ─ ─ Retail-logistics+default+mall.retail.com mon. Properties │ ├ ─ ─ logs │ │ ├ ─ ─ retail - logistics. The log │ │ ├ ─ ─ Retail - logistics. The log. 2018-11-22. 0. Gz │ │ └ ─ ─ retail - logistics. The log. 2018-11-22. 1. Gz │ ├ ─ ─ retail - logistics_tag_1. 0.01. The jar │ ├─ Retail-LogisticS_tag_1.04. │ ├─ Retail-Logistics_tag_1.04 ├─ ├─ ├─ ├─ shop-logistics_tag_1.02.02.02.00Copy the code
  • Proc: This directory is a virtual directory that is a map of system memory and can be accessed directly to retrieve system information. The contents of this directory are not on the hard disk, but in memory. We can also modify some files in it directly. For example, we can block the ping command of the host, so that others cannot ping your machine:
[dev@dev-lhn1d-retail-api1 //]$ cd proc
[dev@dev-lhn1d-retail-api1 proc]$ ls
1      11011  13590  17590  19728  22     23798  24529  25057  26418  27253  27326  28022  283    30     31380  375  472   5    54    8     9176       cpuinfo      fb           kallsyms    loadavg  mtrr          self           sysvipc      vmstat
10     115    14811  18     19804  22138  23924  24530  257    26613  27255  277    28023  28332  30746  32     378  492   506  55    836   acpi       crypto       filesystems  kcore       locks    net           slabinfo       timer_list   zoneinfo
10626  11598  15     19016  2      22413  24234  24559  258    26614  27256  278    28063  284    30748  3250   41   493   513  57    853   buddyinfo  devices      fs           keys        mdstat   pagetypeinfo  softirqs       timer_stats
10738  11600  16     19271  20     22576  24488  247    259    26615  27287  27894  28070  28408  30749  33     42   4942  519  6160  8851  bus        diskstats    interrupts   key-users   meminfo  partitions    stat           tty
10968  11601  16865  19638  20035  22727  24501  25     260    26616  27297  27895  28073  29     31     34     421  496   52   7     9     cgroups    dma          iomem        kmsg        misc     sched_debug   swaps          uptime
10970  12     17     19725  20147  23     24503  25054  26280  26777  27299  28     28074  29122  31377  352    43   497   534  750   9173  cmdline    driver       ioports      kpagecount  modules  schedstat     sys            version
11     13     17484  19727  21     23521  24504  25056  263    27     27300  28020  28112  3      31379  374    44   4989  536  76    9175  consoles   execdomains  irq          kpageflags  mounts   scsi          sysrq-trigger  vmallocinfo
[dev@dev-lhn1d-retail-api1 proc]$ 

Copy the code
  • Root: This directory is the home directory of the system administrator, also known as the super permission user. (I don’t have permission to do this)
[dev@dev-lhn1d-retail-api1 //]$ cd root
-bash: cd: root: Permission denied
[dev@dev-lhn1d-retail-api1 //]$ 

Copy the code
  • Run: indicates the information about a temporary file system since the storage system was started. Files in this directory should be deleted or cleared when the system restarts. If you have the /var/run directory on your system, make it point to run.
[dev@dev-lhn1d-retail-api1 //]$ cd run
[dev@dev-lhn1d-retail-api1 run]$ ls
atd.pid     blkid       console    cron.reboot  dhclient-eth0.pid  initramfs  log    netreport  nscd      plymouth  setrans   sudo         systemd     tuned  user
auditd.pid  cloud-init  crond.pid  dbus         faillock           lock       mount  nginx.pid  ntpd.pid  sepermit  sshd.pid  syslogd.pid  tmpfiles.d  udev   utmp
[dev@dev-lhn1d-retail-api1 run]$ 

Copy the code
  • Sbin: S stands for Super User, which stores the system management program used by the system administrator.
[dev@dev-lhn1d-retail-api1 //]$ cd sbin
[dev@dev-lhn1d-retail-api1 sbin]$ 

Copy the code
  • SRV: This directory stores some data that needs to be extracted after the service is started.
[dev@dev-lhn1d-retail-api1 //]$ cd srv
[dev@dev-lhn1d-retail-api1 srv]$ ls
[dev@dev-lhn1d-retail-api1 srv]$ 

Copy the code
  • Sys: This is a big change from the Linux2.6 kernel. This directory installed a new file system, SYSfs, in the 2.6 kernel. Sysfs file systems integrate information for three types of file systems: Proc file systems for process information, DevFS file systems for devices, and Devpts file systems for pseudo-terminals. The file system is a visual representation of the kernel device tree. When a kernel object is created, the corresponding files and directories are also created in the kernel object subsystem.
[dev@dev-lhn1d-retail-api1 //]$ cd sys
[dev@dev-lhn1d-retail-api1 sys]$ ls
block  bus  class  dev  devices  firmware  fs  hypervisor  kernel  module  power
[dev@dev-lhn1d-retail-api1 sys]$ 

Copy the code
  • TMP: This directory is used to store temporary files.

  • Usr: This is a very important directory that houses many of your applications and files, similar to the Program Files directory on Windows.

[dev@dev-lhn1d-retail-api1 usr]$ ls
bin  etc  games  include  lib  lib64  libexec  local  sbin  share  src  tmp
[dev@dev-lhn1d-retail-api1 usr]$ 

Copy the code
  • Var: This directory holds things that are constantly being expanded, and we tend to put directories that are constantly being modified in this directory. Includes various log files.
[dev@dev-lhn1d-retail-api1 //]$ cd var
[dev@dev-lhn1d-retail-api1 var]$ ls
adm  cache  crash  db  empty  games  gopher  kerberos  lib  local  lock  log  mail  nis  opt  preserve  run  spool  tmp  yp
[dev@dev-lhn1d-retail-api1 var]$ 

Copy the code

Version information

1, # uname -a (Linux)
[dev@dev-lhn1d-retail-api1 //]$ uname -aLinux dev-lhn1d-retail-api1.blissmall.net 3.10.0-693.2.2. El7. X86_64#1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[dev@dev-lhn1d-retail-api1 //]$ 
Copy the code
  • Hardware platform: $uname -i
  • Machine hardware name: $uname -m
  • Node name: $uname -n
  • Operating system: $uname -o
  • System processor architecture: $uname -p
  • Operating system release number: $uname -r
  • System name: $uname -s
  • Kernel version: $uname -v
[dev@dev-lhn1d-retail-api1 //]$ uname -aLinux dev-lhn1d-retail-api1.blissmall.net 3.10.0-693.2.2. El7. X86_64#1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[dev@dev-lhn1d-retail-api1 //]$ uname -i
x86_64
[dev@dev-lhn1d-retail-api1 //]$ uname -m
x86_64
[dev@dev-lhn1d-retail-api1 //]$ uname -n
dev-lhn1d-retail-api1.blissmall.net
[dev@dev-lhn1d-retail-api1 //]$ uname -0
uname: invalid option -- '0'
Try 'uname --help' formore information. [dev@dev-lhn1d-retail-api1 //]$ uname -o GNU/Linux [dev@dev-lhn1d-retail-api1 //]$ uname -p x86_64 [dev@dev-lhn1d-retail-api1 //]$uname -r 3.10.0-693.2.2.el7.x86_64 [dev@dev-lhn1d-retail-api1 //]$uname-s
Linux
[dev@dev-lhn1d-retail-api1 //]$ uname -v
#1 SMP Tue Sep 12 22:26:13 UTC 2017
[dev@dev-lhn1d-retail-api1 //]$ 
Copy the code
2, # cat /proc/version (Linux)
[dev@dev-lhn1d-retail-api1 //]$cat /proc/version Linux version 3.10.0-693.2.2.el7.x86_64 ([email protected]) (GCC version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC))#1 SMP Tue Sep 12 22:26:13 UTC 2017
[dev@dev-lhn1d-retail-api1 //]$ 
Copy the code

Linux version 3.10.0-693.2.2.el7.x86_64 Linux kernel version GCC Version 4.8.5 20150623 GCC compiler version Red Hat Linux4.8.5-16 Red Hat Linux Version 3.10.0-693.2.2.el7.x86_64 GCC version 4.8.5 20150623 GCC compiler version Red Hat Linux4.8.5-16 Red Hat Linux Version

3, # cat /etc/issue or cat /etc/redhat-release (Linux check version current OS release information)
  • On the company’s servers it looks like this: cat /etc/redhat-release
[dev@dev-lhn1d-retail-api1 /]$ cdetc [dev@dev-lhn1d-retail-api1 etc]$ ls adjtime centos-release-upstream csh.login ethertypes group- iproute2 localtime motd os-release profile redhat-release sestatus.conf sudo-ldap.conf virc aliases chkconfig.d dbus-1 exports grub2.cfg issue login.defs mtab pam.d profile.d resolv.conf shadow sysconfig wgetrc aliases.db chrony.conf default favicon.png grub.d issue.net logrotate.conf my.cnf passwd protocols rpc shadow- sysctl.conf wpa_supplicant alternatives chrony.keys depmod.d filesystems gshadow kdump.conf logrotate.d my.cnf.d passwd- python rpm shells sysctl.d X11 anacrontab cloud dhcp firewalld gshadow- kernel lsb-release.d NetworkManager pkcs11 rc0.d rsyncd.conf skel systemd xdg asound.conf cron.d  DIR_COLORS fonts gss krb5.conf machine-id networks pki rc1.d rsyslog.conf ssh system-release xinetd.d at.deny cron.daily DIR_COLORS.256color fstab host.conf krb5.conf.d machine-info nginx plymouth rc2.d rsyslog.d ssl system-release-cpe yum audisp cron.deny DIR_COLORS.lightbgcolor gcrypt hostname ld.so.cache magic nscd.conf pm rc3.d rwtab statetab terminfo yum.conf audit cron.hourly dracut.conf GeoIP.conf hosts ld.so.conf mail.rc nsswitch.conf polkit-1 rc4.d rwtab.d statetab.d timezone yum.repos.d backup cron.monthly dracut.conf.d GeoIP.conf.default hosts.allow ld.so.conf.d makedumpfile.conf.sample nsswitch.conf.bak popt.d rc5.d sasl2 subgid tmpfiles.d bash_completion.d crontab dracut.conf.d? gnupg hosts.deny libaudit.conf man_db.conf ntp postfix rc6.d securetty subuid tuned bashrc cron.weekly e2fsck.conf GREP_COLORS init.d libnl mke2fs.conf ntp.conf ppp rc.d security sudo.conf udev binfmt.d crypttab eni_utils groff inittab libuser.conf modprobe.d openldap prelink.conf.d rc.local selinux sudoers vconsole.conf centos-release csh.cshrc environment group inputrc locale.conf modules-load.d opt printcap redhat-lsb services sudoers.d vimrc [dev@dev-lhn1d-retail-api1 etc]$cat Redhat -release CentOS Linux release 7.4.1708 (Core) [dev@dev-lhn1d-retail-api1 etc]$Copy the code
4, # cat /proc/cpuinfo
[dev@dev-lhn1d-retail-api1 proc]$ cat cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 85 Model Name: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz Stepping: 4 Microcode: 0x1 CPU MHz: 2500.008 Cache size: 33792 KB Physical ID: 0 Siblings: 4 Core ID: 0 CPU cores: 2 APicID: 0 Initial APicID: 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap avx512cdAvx512bw avx512vL xsaveopt xsavec xgetBv1 bogomips: 5000.01 clFlush size: 64 cache_alignment: 64 address Sizes: 46 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 85 Model Name: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz Stepping: 4 Microcode: 0x1 CPU MHz: 2500.008 Cache size: 33792 KB Physical ID: 0 Siblings: 4 Core ID: 0 CPU cores: 2 APicID: 1 Initial APicID: 1 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap avx512cdAvx512bw avx512vL xsaveopt xsavec xgetBv1 bogomips: 5000.01 clFlush size: 64 cache_alignment: 64 address Sizes: 46 bits physical, 48 bits virtual power management: processor : 2 vendor_id : GenuineIntel cpu family : 6 model : 85 Model Name: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz Stepping: 4 Microcode: 0x1 CPU MHz: 2500.008 Cache size: 33792 KB Physical ID: 0 siblings: 4 Core ID: 1 CPU cores: 2 APicID: 2 Initial APicID: 2 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap avx512cdAvx512bw avx512vL xsaveopt xsavec xgetBv1 bogomips: 5000.01 clFlush size: 64 cache_alignment: 64 address Sizes: 46 bits physical, 48 bits virtual power management: processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 85 Model Name: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz Stepping: 4 Microcode: 0x1 CPU MHz: 2500.008 Cache size: 33792 KB Physical ID: 0 siblings: 4 Core ID: 1 CPU cores: 2 APicID: 3 Initial APicID: 3 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap avx512cdAvx512bw avx512vL xsaveopt xsavec xgetBv1 bogomips: 5000.01 clFlush size: 64 cache_alignment: 64 address Sizes: 46 bits physical, 48 bits virtual power management: [dev@dev-lhn1d-retail-api1 proc]$Copy the code

Tip

  • In Linux, several directories are important. Do not delete or modify internal files.
  • /etc: as mentioned above, this is the configuration file in the system. If you change a file in this directory, the system may not boot.
  • /bin, /sbin, /usr/bin, /usr/sbin: This is the default directory for storing execution files. For example, /bin/ls is the directory for storing execution files.
  • It is worth noting that /bin, /usr/bin are directives for system users (common users except root), and /sbin, /usr/sbin are directives for root.
  • /var: This is a very important directory. There are many programs running on the system, so each program will have corresponding logs, and these logs are recorded in this directory, specifically in /var/log directory, in addition to mail is placed in this directory.
  • cd .. Return to the previous directory CD/Return to the root directory ls Lists the current directory of folders and files PWD
  • To be continued…

Xmind

Thanks

  • Uname -a Analyses the output
  • Company’s Java development engineer Ren Huan
  • This section describes the Linux directory structure