0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Linux・WSL・VirtualBoxの違い

Posted at

🧠 Linux・WSL・VirtualBoxの違い

  • VirtualBox + CentOS Stream 9
    仮想マシンとしてフルOSを実行。物理マシンと隔離されていて、リソース消費は多いが、本番環境に近い

  • WSL (Windows Subsystem for Linux)
    Windows内でLinuxを実行できる軽量な方法。起動が早く、Windowsとの連携もスムーズ。ただし完全なLinuxカーネルではない点に注意


🔐 BPFベースのバックドアの仕組み(分析中)

  • BPF(Berkeley Packet Filter)を使ってパケットをフィルタリング
  • 特定のパケットに反応してシェルアクセスを許可。
  • 通常のポート監視やログ検出では見逃されるステルス性あり

🔍 ps aux | grep + 正規表現 の使い方

ps aux | grep -E 'nc|ncat|netcat|curl|wget'

複数のネットワーク系プロセスを一括検索できる。


📁 Linux ファイル操作補足

cat file1 | head -n 15  # 先頭15行のみ表示

🧱 RedHat系 vs Ubuntu系 の違い(パッケージ管理)

項目 RedHat系 (CentOS/RHEL) Debian系 (Ubuntu)
パッケージ管理 yum, dnf apt
Apache名 httpd apache2
firewallコマンド firewall-cmd ufw
SELinux デフォルトで有効 無し

🌐 Apache + UFW セットアップメモ(Ubuntu)

sudo apt install apache2
sudo systemctl start apache2
sudo ufw allow http
sudo ufw enable
sudo systemctl status apache2

UFWがinactiveの場合、sudo ufw enable で有効化。


💬 Redux Slice解説(TypeScript)

const messageSlice = createSlice({
  name: 'message',
  initialState,
  reducers: {
    setMessage: (state, action: PayloadAction<string>) => {
      state.message = action.payload
    },
  },
})
  • createSlice: reducer + action を一括定義
  • setMessage: state.message を更新するアクション
  • export default messageSlice.reducer: reducer部分のみエクスポート

📌 その他

  • export const messageReducer = messageSlice.reducer でも同様の意味
  • export default messageSlice をしないのは、reducerだけを明示的にエクスポートするため

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?