LoginSignup
10
16

More than 5 years have passed since last update.

新卒内定者向けにLinux基本操作を伝授したい

Posted at

弊社では毎年9月〜2月に月1回のペースで新卒内定者向けに研修を実施しています。
今回私はインフラ向けの研修を担当することになったのでLinuxの基本操作を研修で行うことに決めました。CPUやメモリ使用率の確認コマンドも紹介していますが内定者に出力結果の説明まですると???になってしまうと思うのでそれはまた別の機会にやろうかと。。

ということで内定者またはLinux初学者向けに投稿しています。

hostname 現在ログインしているサーバのホスト名を確認する

vagrant@localhost ~]$ hostname
localhost.localdomain

pwd 現在のディレクトリを確認する

[vagrant@localhost ~]$ pwd
/home/vagrant

cd ディレクトリを移動する

[vagrant@localhost ~]$ cd /tmp/
[vagrant@localhost tmp]$ 

ls ディレクトリ内のファイル一覧を表示する

vagrant@localhost etc]$ ls -l
合計 1136
-rw-r--r--   1 root root   5090  2月 16  2016 DIR_COLORS
-rw-r--r--   1 root root   5725  2月 16  2016 DIR_COLORS.256color
-rw-r--r--   1 root root   4669  2月 16  2016 DIR_COLORS.lightbgcolor
-rw-r--r--   1 root root     94  4月 29  2015 GREP_COLORS
drwxr-xr-x.  7 root root   4096  6月 19  2016 NetworkManager
drwxr-xr-x.  5 root root     54  8月 12  2015 X11
-rw-r--r--.  1 root root     16 11月  2  2015 adjtime
-rw-r--r--   1 root root   1518  6月  7  2013 aliases
-rw-r--r--   1 root root  12288  8月 13 11:30 aliases.db
drwxr-xr-x.  2 root root   4096  6月 19  2016 alternatives
-rw-------   1 root root    541  3月 31  2016 anacrontab
-rw-r--r--.  1 root root     55  3月  5  2015 asound.conf
drwxr-x---.  3 root root     41 11月  2  2015 audisp
drwxr-x---.  3 root root     79 11月  2  2015 audit
drwxr-xr-x.  2 root root     33  6月 19  2016 avahi
drwxr-xr-x.  2 root root     48  6月 19  2016 bash_completion.d
-rw-r--r--   1 root root   2835  8月 12  2015 bashrc
drwxr-xr-x.  2 root root      6  5月 12  2016 binfmt.d
-rw-r--r--   1 root root     38 12月  9  2015 centos-release
-rw-r--r--   1 root root     51 12月  9  2015 centos-release-upstream
drwxr-xr-x.  2 root root      6  5月 12  2016 chkconfig.d
drwxr-xr-x.  2 root root     34  8月 14 01:12 cron.d
drwxr-xr-x.  2 root root     62  6月 19  2016 cron.daily
~省略〜

隠しファイルを確認

[vagrant@localhost ~]$ ls -la
合計 24
drwx------. 3 vagrant vagrant 4096  1月  4 02:14 .
drwxr-xr-x. 3 root    root      20  8月 12  2015 ..
-rw-------  1 vagrant vagrant  205  8月 14 01:28 .bash_history
-rw-r--r--. 1 vagrant vagrant   18  3月  5  2015 .bash_logout
-rw-r--r--. 1 vagrant vagrant  193  3月  5  2015 .bash_profile
-rw-r--r--. 1 vagrant vagrant  231  3月  5  2015 .bashrc
drwx------  2 vagrant vagrant   28  6月 19  2016 .ssh
-rw-r--r--  1 vagrant vagrant    6 11月  2  2015 .vbox_version
-rw-rw-r--  1 vagrant vagrant    0  1月  4 02:14 hoge

cat/less ファイルの中身を見る

catコマンド

[vagrant@localhost ~]$ cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 

lessコマンド

vagrant@localhost log]$ sudo less /var/log/messages
Nov  2 15:20:33 localhost rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="565" x-info="http://www.rsyslog.com"] start
Nov  2 15:20:30 localhost journal: Runtime journal is using 4.0M (max 30.7M, leaving 46.1M of free 303.7M, current limit 30.7M).
Nov  2 15:20:30 localhost journal: Runtime journal is using 4.0M (max 30.7M, leaving 46.1M of free 303.7M, current limit 30.7M).
Nov  2 15:20:30 localhost kernel: Initializing cgroup subsys cpuset
Nov  2 15:20:30 localhost kernel: Initializing cgroup subsys cpu
Nov  2 15:20:30 localhost kernel: Initializing cgroup subsys cpuacct
Nov  2 15:20:30 localhost kernel: Linux version 3.10.0-229.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Fri Mar 6 11:36:42 UTC 2015
Nov  2 15:20:30 localhost kernel: Command line: BOOT_IMAGE=/vmlinuz-3.10.0-229.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet LANG=en_GB.UTF-8
Nov  2 15:20:30 localhost kernel: e820: BIOS-provided physical RAM map:
Nov  2 15:20:30 localhost kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
Nov  2 15:20:30 localhost kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
Nov  2 15:20:30 localhost kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
Nov  2 15:20:30 localhost kernel: BIOS-e820: [mem 0x0000000000100000-0x0000000027feffff] usable
Nov  2 15:20:30 localhost kernel: BIOS-e820: [mem 0x0000000027ff0000-0x0000000027ffffff] ACPI data
Nov  2 15:20:30 localhost kernel: BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
Nov  2 15:20:30 localhost kernel: NX (Execute Disable) protection: active
Nov  2 15:20:30 localhost kernel: SMBIOS 2.5 present.

Ctrl + Gで末尾に移動する(Windows)
control + Gで末尾に移動する(Mac OS)
qを押して抜ける

more ページ単位でファイルの中身を見る

# rsyslog configuration file

# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html

#### MODULES ####

# The imjournal module bellow is now used as a message source instead of imuxsoc
k.
$ModLoad imuxsock # provides support for local system logging (e.g. via logger c
ommand)
$ModLoad imjournal # provides access to the systemd journal
#$ModLoad imklog # reads kernel messages (the same are read from journald)
#$ModLoad immark  # provides --MARK-- message capability

# Provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514

# Provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514


#### GLOBAL DIRECTIVES ####

# Where to place auxiliary files
$WorkDirectory /var/lib/rsyslog

# Use default timestamp format
--続ける--(25%)

SPACEキーで次のページを表示させる

sudo スーパーユーザーに切り替える

[vagrant@localhost tmp]$ sudo su
[root@localhost tmp]#   

スーパーユーザーから抜ける

[root@localhost tmp]# exit
exit
[vagrant@localhost ~]$ 

vi ファイルを編集する

[vagrant@localhost etc]$ vi rsyslog.conf
# rsyslog configuration file

# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html

#### MODULES ####

# The imjournal module bellow is now used as a message source instead of imuxsock.
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imjournal # provides access to the systemd journal
#$ModLoad imklog # reads kernel messages (the same are read from journald)
#$ModLoad immark  # provides --MARK-- message capability

# Provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514

# Provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514


#### GLOBAL DIRECTIVES ####

# Where to place auxiliary files
$WorkDirectory /var/lib/rsyslog
~省略~

'ESC' + ':'' + 'q'で変更を保存せず編集を終了する
'ESC' + ':'' + 'q!'で編集中でも保存せずに強制で編集を終了する
'ESC' + ':'' + 'wq'で変更を保存して編集を終了する

touch ファイルを作成する

[vagrant@localhost tmp]$ touch hogehoge
[vagrant@localhost tmp]$ ls -l
合計 0
-rw-rw-r-- 1 vagrant vagrant 0  1月  4 02:53 hogehoge

cp ファイルをコピーする

[vagrant@localhost tmp]$ cp hogehoge hogahoga
[vagrant@localhost tmp]$ ls -l
合計 0
-rw-rw-r-- 1 vagrant vagrant 0  1月  4 02:56 hogahoga
-rw-rw-r-- 1 vagrant vagrant 0  1月  4 02:53 hogehoge

mv ファイルを移動する

vagrant@localhost tmp]$ mv hogehoge ~/
[vagrant@localhost tmp]$ ls -l
合計 0
-rw-rw-r-- 1 vagrant vagrant 0  1月  4 02:56 hogahoga
[vagrant@localhost tmp]$ cd ~/
[vagrant@localhost ~]$ ls -l
合計 0
-rw-rw-r-- 1 vagrant vagrant 0  1月  4 02:14 hoge
-rw-rw-r-- 1 vagrant vagrant 0  1月  4 02:53 hogehoge

mv ファイルをリネームする

[vagrant@localhost ~]$ mv hogehoge fugahuga
[vagrant@localhost ~]$ ls -l
合計 0
-rw-rw-r-- 1 vagrant vagrant 0  1月  4 02:53 fugahuga
-rw-rw-r-- 1 vagrant vagrant 0  1月  4 02:14 hoge

mkdir フォルダを作成する

[vagrant@localhost tmp]$ mkdir mogamoga
[vagrant@localhost tmp]$ ls -l
合計 0
-rw-rw-r-- 1 vagrant vagrant 0  1月  4 02:56 hogahoga
drwxrwxr-x 2 vagrant vagrant 6  1月  4 03:10 mogamoga

rm ファイルを削除する

[vagrant@localhost tmp]$ rm hogahoga
[vagrant@localhost tmp]$ ls -l
合計 0
drwxrwxr-x 2 vagrant vagrant 6  1月  4 03:10 mogamoga

rmdir ディレクトリを削除する

[vagrant@localhost tmp]$ rmdir mogamoga/
[vagrant@localhost tmp]$ ls -l
合計 0

find 指定したファイルを検索する

[vagrant@localhost ~]$ sudo find / -name yum.conf
/etc/yum.conf

history 実行したコマンドの履歴を確認する

[vagrant@localhost ~]$ history
    1  ls
    2  sudo cat /etc/redhat-release 
    3  yum update -y 
    4  sudo yum update -y 
    5  sudo cat /etc/redhat-release 
    6  sudo yum install net-tools
    7  ifconfig
    8  exit
    9  date
   10  cd /etc/yum.repos.d/
   11  ll
   12  vim nginx.repo
   13  vi nginx.repo
   14  sudo su

date 日付時刻を確認する

[vagrant@localhost ~]$ date
2017年  1月  4日 水曜日 02:04:39 GMT

ifconfig IPアドレスを確認する

[vagrant@localhost ~]$ ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fe80::a00:27ff:fe51:d15e  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:51:d1:5e  txqueuelen 1000  (Ethernet)
        RX packets 3322  bytes 418090 (408.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2795  bytes 250103 (244.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.33.16  netmask 255.255.255.0  broadcast 192.168.33.255
        inet6 fe80::a00:27ff:fe91:6c05  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:91:6c:05  txqueuelen 1000  (Ethernet)
        RX packets 103  bytes 30466 (29.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 21  bytes 1566 (1.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

shutdown サーバを停止する

[root@localhost vagrant]# shatdown -h now

df ディスク容量を確認する

KB単位で確認

vagrant@localhost ~]$ df
ファイルシス            1K-ブロック    使用  使用可 使用% マウント位置
/dev/mapper/centos-root     8648704 1722160 6926544   20% /
devtmpfs                     304920       0  304920    0% /dev
tmpfs                        314992       0  314992    0% /dev/shm
tmpfs                        314992    4392  310600    2% /run
tmpfs                        314992       0  314992    0% /sys/fs/cgroup
/dev/sda1                    508588  208896  299692   42% /boot
tmpfs                         63000       0   63000    0% /run/user/1000
tmpfs                         63000       0   63000    0% /run/user/0

GB/MBで確認

[vagrant@localhost ~]$ df -h
ファイルシス            サイズ  使用  残り 使用% マウント位置
/dev/mapper/centos-root   8.3G  1.7G  6.7G   20% /
devtmpfs                  298M     0  298M    0% /dev
tmpfs                     308M     0  308M    0% /dev/shm
tmpfs                     308M  4.3M  304M    2% /run
tmpfs                     308M     0  308M    0% /sys/fs/cgroup
/dev/sda1                 497M  204M  293M   42% /boot
tmpfs                      62M     0   62M    0% /run/user/1000
tmpfs                      62M     0   62M    0% /run/user/0

free メモリ使用率を確認する

[vagrant@localhost ~]$ free
              total        used        free      shared  buff/cache   available
Mem:         629984       74656      453996        4704      101332      458096
Swap:       1023996           0     1023996

w/top CPU使用率を確認する

wコマンド

[vagrant@localhost ~]$ w
 02:08:20 up 50 min,  1 user,  load average: 0.00, 0.01, 0.02
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
vagrant  pts/0    gateway          01:27    4.00s  0.04s  0.00s w

topコマンド

[vagrant@localhost ~]$ top

top - 02:09:39 up 52 min,  1 user,  load average: 0.00, 0.01, 0.02
Tasks:  94 total,   1 running,  93 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :   629984 total,   453288 free,    74952 used,   101744 buff/cache
KiB Swap:  1023996 total,  1023996 free,        0 used.   457596 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND    
   29 root      20   0       0      0      0 S   0.3  0.0   0:00.20 kworker/0:1
  262 root      20   0       0      0      0 S   0.3  0.0   0:01.37 kworker/1:2
    1 root      20   0   41284   3728   2388 S   0.0  0.6   0:00.76 systemd    
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kthreadd   
    3 root      20   0       0      0      0 S   0.0  0.0   0:00.00 ksoftirqd/0
    5 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:+
    6 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kworker/u4+
    7 root      rt   0       0      0      0 S   0.0  0.0   0:00.33 migration/0
    8 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh     
    9 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcuob/0    
   10 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcuob/1    
   11 root      20   0       0      0      0 S   0.0  0.0   0:00.29 rcu_sched  
   12 root      20   0       0      0      0 S   0.0  0.0   0:00.11 rcuos/0    
   13 root      20   0       0      0      0 S   0.0  0.0   0:00.07 rcuos/1    
   14 root      rt   0       0      0      0 S   0.0  0.0   0:00.04 watchdog/0 
   15 root      rt   0       0      0      0 S   0.0  0.0   0:00.07 watchdog/1 
   16 root      rt   0       0      0      0 S   0.0  0.0   0:00.02 migration/1
   17 root      20   0       0      0      0 S   0.0  0.0   0:00.01 ksoftirqd/1
   19 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/1:+
   20 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 khelper    
   21 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kdevtmpfs  
   22 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 netns      
   23 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 perf       
   24 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 writeback  

qを押して抜ける

yum パッケージをインストールする

ここではApache(webサーバ)インストールする

[root@localhost ~]# yum install httpd
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.riken.jp
 * epel: ftp.riken.jp
 * extras: ftp.riken.jp
 * updates: ftp.riken.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ httpd.x86_64 0:2.4.6-45.el7.centos を インストール
--> 依存性の処理をしています: httpd-tools = 2.4.6-45.el7.centos のパッケージ: httpd-2.4.6-45.el7.centos.x86_64
--> 依存性の処理をしています: /etc/mime.types のパッケージ: httpd-2.4.6-45.el7.centos.x86_64
--> 依存性の処理をしています: libaprutil-1.so.0()(64bit) のパッケージ: httpd-2.4.6-45.el7.centos.x86_64
--> 依存性の処理をしています: libapr-1.so.0()(64bit) のパッケージ: httpd-2.4.6-45.el7.centos.x86_64
--> トランザクションの確認を実行しています。
---> パッケージ apr.x86_64 0:1.4.8-3.el7 を インストール
---> パッケージ apr-util.x86_64 0:1.5.2-6.el7 を インストール
---> パッケージ httpd-tools.x86_64 0:2.4.6-45.el7.centos を インストール
---> パッケージ mailcap.noarch 0:2.1.41-2.el7 を インストール
--> 依存性解決を終了しました。

依存性を解決しました

================================================================================
 Package            アーキテクチャー
                                  バージョン                  リポジトリー
                                                                           容量
================================================================================
インストール中:
 httpd              x86_64        2.4.6-45.el7.centos         base        2.7 M
依存性関連でのインストールをします:
 apr                x86_64        1.4.8-3.el7                 base        103 k
 apr-util           x86_64        1.5.2-6.el7                 base         92 k
 httpd-tools        x86_64        2.4.6-45.el7.centos         base         84 k
 mailcap            noarch        2.1.41-2.el7                base         31 k

トランザクションの要約
================================================================================
インストール  1 パッケージ (+4 個の依存関係のパッケージ)

総ダウンロード容量: 3.0 M
インストール容量: 10 M
Is this ok [y/d/N]: y
Downloading packages:
(1/5): apr-util-1.5.2-6.el7.x86_64.rpm                     |  92 kB   00:00     
(2/5): apr-1.4.8-3.el7.x86_64.rpm                          | 103 kB   00:00     
(3/5): httpd-tools-2.4.6-45.el7.centos.x86_64.rpm          |  84 kB   00:00     
(4/5): mailcap-2.1.41-2.el7.noarch.rpm                     |  31 kB   00:00     
(5/5): httpd-2.4.6-45.el7.centos.x86_64.rpm                | 2.7 MB   00:00     
--------------------------------------------------------------------------------
合計                                               2.7 MB/s | 3.0 MB  00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : apr-1.4.8-3.el7.x86_64                          1/5 
  インストール中          : apr-util-1.5.2-6.el7.x86_64                     2/5 
  インストール中          : httpd-tools-2.4.6-45.el7.centos.x86_64          3/5 
  インストール中          : mailcap-2.1.41-2.el7.noarch                     4/5 
  インストール中          : httpd-2.4.6-45.el7.centos.x86_64                5/5 
  検証中                  : httpd-tools-2.4.6-45.el7.centos.x86_64          1/5 
  検証中                  : mailcap-2.1.41-2.el7.noarch                     2/5 
  検証中                  : apr-1.4.8-3.el7.x86_64                          3/5 
  検証中                  : httpd-2.4.6-45.el7.centos.x86_64                4/5 
  検証中                  : apr-util-1.5.2-6.el7.x86_64                     5/5 

インストール:
  httpd.x86_64 0:2.4.6-45.el7.centos                                            

依存性関連をインストールしました:
  apr.x86_64 0:1.4.8-3.el7                     apr-util.x86_64 0:1.5.2-6.el7    
  httpd-tools.x86_64 0:2.4.6-45.el7.centos     mailcap.noarch 0:2.1.41-2.el7    

完了しました!

systemctl サービスの確認・起動・停止をする

httpdの起動

[root@localhost ~]# systemctl start httpd

httpdの状態確認

[root@localhost ~]# service httpd status
Redirecting to /bin/systemctl status  httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: active (running) since 水 2017-01-04 03:45:30 GMT; 1min 37s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 4907 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
 Main PID: 4956 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─4956 /usr/sbin/httpd -DFOREGROUND
           ├─4957 /usr/sbin/httpd -DFOREGROUND
           ├─4958 /usr/sbin/httpd -DFOREGROUND
           ├─4959 /usr/sbin/httpd -DFOREGROUND
           ├─4960 /usr/sbin/httpd -DFOREGROUND
           └─4961 /usr/sbin/httpd -DFOREGROUND

 1月 04 03:45:30 localhost.localdomain systemd[1]: Starting The Apache HTTP ...
 1月 04 03:45:30 localhost.localdomain httpd[4956]: AH00558: httpd: Could no...
 1月 04 03:45:30 localhost.localdomain systemd[1]: Started The Apache HTTP S...
 1月 04 03:47:02 localhost.localdomain systemd[1]: Started The Apache HTTP S...
Hint: Some lines were ellipsized, use -l to show in full.

httpdの停止

[root@localhost ~]# systemctl stop httpd

ps プロセスの状態を確認する

[vagrant@localhost tmp]$ ps -ef | grep httpd
root      5046     1  0 03:50 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    5047  5046  0 03:50 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    5048  5046  0 03:50 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    5049  5046  0 03:50 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    5050  5046  0 03:50 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    5051  5046  0 03:50 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
vagrant   5055  4306  0 03:51 pts/0    00:00:00 grep --color=auto httpd

補足 主要ディレクトリの役割について

表で記述しようとしましたが以下サイトが大変参考になるため
車輪の再発明は避けます。。

Linuxの基本の基本。Linuxの基本的なディレクトリ構成

10
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
16