dashmagic-sparkles / linux-runlevels.html
farukhugging's picture
নিম্নলিখিত কন্টেন্ট টি দেখুন:12s-এর জন্য চিন্তা করা হয়েছেলিনাক্সে ডিফল্ট রানলেভেল পরিবর্তন করার নির্দেশিকা
1293db4 verified
Raw History Blame Contribute Delete
5.84 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Linux Runlevels - DashMagic</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
</head>
<body class="bg-gray-50 min-h-screen">
<div class="fixed inset-y-0 left-0 w-64 bg-white shadow-lg">
<!-- Same sidebar as index.html -->
<div class="flex items-center justify-center h-16 bg-primary-500 text-white">
<i data-feather="zap" class="mr-2"></i>
<span class="text-xl font-bold">DashMagic</span>
</div>
<nav class="mt-6">
<a href="/" class="px-6 py-3 flex items-center text-gray-600 hover:bg-gray-100 hover:text-gray-800">
<i data-feather="home" class="w-5 h-5"></i>
<span class="mx-3 font-medium">Dashboard</span>
</a>
<a href="/linux-runlevels.html" class="px-6 py-3 flex items-center bg-primary-100 text-primary-700 border-l-4 border-primary-500">
<i data-feather="terminal" class="w-5 h-5"></i>
<span class="mx-3 font-medium">Linux Runlevels</span>
</a>
</nav>
</div>
<div class="ml-64 p-6">
<header class="flex justify-between items-center mb-8">
<h1 class="text-3xl font-bold text-gray-800">Linux Runlevels Guide</h1>
</header>
<div class="bg-white p-6 rounded-xl shadow-md mb-8">
<h2 class="text-xl font-semibold mb-4">Changing Default Runlevel in Linux</h2>
<p class="mb-4">This guide explains how to change default runlevels in systemd-based Linux distributions (Ubuntu, CentOS etc).</p>
<div class="space-y-6">
<div>
<h3 class="text-lg font-medium mb-2">1. Check Current Runlevel</h3>
<div class="bg-gray-100 p-4 rounded-md">
<code>runlevel</code><br>
<code>systemctl get-default</code>
</div>
</div>
<div>
<h3 class="text-lg font-medium mb-2">2. Change Default Runlevel (Permanent)</h3>
<p class="mb-2">Method 1: Using systemctl</p>
<div class="bg-gray-100 p-4 rounded-md mb-4">
<code>systemctl set-default multi-user.target # Text mode (runlevel 3)</code><br>
<code>systemctl set-default graphical.target # GUI mode (runlevel 5)</code>
</div>
<p class="mb-2">Method 2: Using symbolic links</p>
<div class="bg-gray-100 p-4 rounded-md">
<code>ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target</code>
</div>
</div>
<div>
<h3 class="text-lg font-medium mb-2">3. Temporary Runlevel Change</h3>
<div class="bg-gray-100 p-4 rounded-md">
<code>systemctl isolate graphical.target # Switch to GUI</code><br>
<code>systemctl isolate multi-user.target # Switch to text mode</code>
</div>
</div>
<div>
<h3 class="text-lg font-medium mb-2">Common Runlevels</h3>
<div class="overflow-x-auto">
<table class="min-w-full bg-white border">
<thead>
<tr class="bg-gray-100">
<th class="py-2 px-4 border">Runlevel</th>
<th class="py-2 px-4 border">Target</th>
<th class="py-2 px-4 border">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="py-2 px-4 border">0</td>
<td class="py-2 px-4 border">runlevel0.target</td>
<td class="py-2 px-4 border">Shutdown/Halt</td>
</tr>
<tr>
<td class="py-2 px-4 border">1</td>
<td class="py-2 px-4 border">runlevel1.target</td>
<td class="py-2 px-4 border">Single-user mode</td>
</tr>
<tr>
<td class="py-2 px-4 border">3</td>
<td class="py-2 px-4 border">multi-user.target</td>
<td class="py-2 px-4 border">Text multi-user</td>
</tr>
<tr>
<td class="py-2 px-4 border">5</td>
<td class="py-2 px-4 border">graphical.target</td>
<td class="py-2 px-4 border">Graphical multi-user</td>
</tr>
<tr>
<td class="py-2 px-4 border">6</td>
<td class="py-2 px-4 border">runlevel6.target</td>
<td class="py-2 px-4 border">Reboot</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script>
feather.replace();
</script>
</body>
</html>