共计 2691 个字符,预计需要花费 7 分钟才能阅读完成。
提醒:本文最后更新于2019-07-17 19:37,文中所关联的信息可能已发生改变,请知悉!
[v_error]此命令特点:内容不分页直接全部显示,因此不适合用于大文件的查阅。[/v_error]
[v_act]格式:cat [OPTION]… [FILE]…
-n:查看内容时标注行号,仅为便于查看,不属于文件内容。[/v_act]
[root@localhost ~]# cat anaconda-ks.cfg
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --bootproto=static --device=eno16777736 --gateway=192.168.1.1 --ip=192.168.1.251 --nameserver=61.177.7.1 --netmask=255.255.255.0 --ipv6=auto --activate
network --hostname=localhost.localdomain
# Root password
rootpw --iscrypted $6$JQBUj0EzywJPx59P$e8E3iEnmvoof0UxzNFq8xKgIVXTSCGPZ5b3DE0PJdFoESlvMcZTIXv8qnOlRiEc9AAhL0fqhHuKAnUkMZr5o61
# System services
services --enabled="chronyd"
# System timezone
timezone Asia/Shanghai --isUtc
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
# Partition clearing information
clearpart --none --initlabel
# Disk partitioning information
part /boot --fstype="xfs" --ondisk=sda --size=200
part / --fstype="xfs" --ondisk=sda --size=44999
part swap --fstype="swap" --ondisk=sda --size=6000
%packages
@^minimal
@compat-libraries
@core
@debugging
@development
chrony
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
[root@localhost ~]#
-n:查看内容时标注行号,仅为便于查看,不属于文件内容。
[root@localhost ~]# cat -n anaconda-ks.cfg
1 #version=DEVEL
2 # System authorization information
3 auth --enableshadow --passalgo=sha512
4 # Use CDROM installation media
5 cdrom
6 # Use graphical install
7 graphical
8 # Run the Setup Agent on first boot
9 firstboot --enable
10 ignoredisk --only-use=sda
11 # Keyboard layouts
12 keyboard --vckeymap=us --xlayouts='us'
13 # System language
14 lang en_US.UTF-8
15
16 # Network information
17 network --bootproto=static --device=eno16777736 --gateway=192.168.1.1 --ip=192.168.1.251 --nameserver=61.177.7.1 --netmask=255.255.255.0 --ipv6=auto --activate
18 network --hostname=localhost.localdomain
19
20 # Root password
21 rootpw --iscrypted $6$JQBUj0EzywJPx59P$e8E3iEnmvoof0UxzNFq8xKgIVXTSCGPZ5b3DE0PJdFoESlvMcZTIXv8qnOlRiEc9AAhL0fqhHuKAnUkMZr5o61
22 # System services
23 services --enabled="chronyd"
24 # System timezone
25 timezone Asia/Shanghai --isUtc
26 # System bootloader configuration
27 bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
28 # Partition clearing information
29 clearpart --none --initlabel
30 # Disk partitioning information
31 part /boot --fstype="xfs" --ondisk=sda --size=200
32 part / --fstype="xfs" --ondisk=sda --size=44999
33 part swap --fstype="swap" --ondisk=sda --size=6000
34
35 %packages
36 @^minimal
37 @compat-libraries
38 @core
39 @debugging
40 @development
41 chrony
42 kexec-tools
43
44 %end
45
46 %addon com_redhat_kdump --enable --reserve-mb='auto'
47
48 %end
[root@localhost ~]#
正文完