linux 第一支啟動的程式為init
which init
ls -l /usr/sbin/init
-> /lib/systemd/systemd
(有systemd的話就是systemd開機)
控制與檢查systemctl服務狀態
systemctl (顯示所有unit)
systemctl list-unit-files (以高可讀方式列出
enabled 開機自動啟用
disabled 開機不自動啟用
用於確定ssh是不是runing
systemctl status ssh.service (檢查ssh服務)
systemctl restart ssh.service (重啟ssh服務)
jobs (列出背景程式)
bg + 編號 (繼續在背景作業)
fg + 編號 (將背景作業送到前景)
*在ps中只能看有沒有在記憶體
ps -el | grep '關鍵字'
在bash時是登出
在互動時為完畢(結束)程序
1.網路有通
2.預設路由是正確的
3.名稱解析(DNS)是正確的
4.有合法IP(但不一定是正確的)
查IP要用ip adder show
# grep 'hadoop' /etc/passwd /etc/shadow /etc/group (查帳號、密碼、群組)
/etc/passwd:hadoop:x:1001:1001:,,,:/home/hadoop:/bin/bash (帳號名稱 編號只有自己有,1000號起跳)
/etc/shadow:hadoop:$6$MtY4jI97.oERMQ1K$WrpNJoIq8QC/q5Yc4.Zo5UZeF94bgcWLsQfPcUDkU/tIJf7h47WzQlu7HO6cixaUzmffq78M70Nuw9BVFKLSP.:19104:0:99999:7::: (密碼 加密方式$6$ > sha-512)
/etc/group:hadoop:x:1001: (私有群組,只有自己本人,群組名為帳號名)
修改使用者:
修改群組:
一次改兩個:
簡寫:
新開的與原來的不一樣(在不同記憶體位置上)
/etc/profile
/etc/profile calls /ect/bash.bashrc
/etc/profile calls /etc/profile.d/*.sh
(系統)
(個人)
~/.profile
~/.profile calls ~/.bashrc
若筆記內有發現錯誤隨時可以登入後在這邊留言~
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing