<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: JZTN</title>
    <description>The latest articles on DEV Community by JZTN (@jeztn).</description>
    <link>https://dev.to/jeztn</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F962010%2F54f9e032-3ee8-4add-a7a3-3a7c7e97c3fe.jpeg</url>
      <title>DEV Community: JZTN</title>
      <link>https://dev.to/jeztn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jeztn"/>
    <language>en</language>
    <item>
      <title>Ubuntu CLI cheat sheet</title>
      <dc:creator>JZTN</dc:creator>
      <pubDate>Wed, 05 Feb 2025 07:12:10 +0000</pubDate>
      <link>https://dev.to/jeztn/ubuntu-cli-cheat-sheet-igl</link>
      <guid>https://dev.to/jeztn/ubuntu-cli-cheat-sheet-igl</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;System&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;System information&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Displays all system information.&lt;/span&gt;
&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt;
&lt;span class="c"&gt;# Shows current hostname and related details.&lt;/span&gt;
hostnamectl
&lt;span class="c"&gt;# Lists CPU architecture information.&lt;/span&gt;
lscpu
&lt;span class="c"&gt;# Shows system time.&lt;/span&gt;
timedatectl status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;System monitoring and management&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Displays real-time system processes.&lt;/span&gt;
top
&lt;span class="c"&gt;# An interactive process viewer (needs installation).&lt;/span&gt;
htop
&lt;span class="c"&gt;# Shows disk usage in a human-readable format.&lt;/span&gt;
&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt;
&lt;span class="c"&gt;# Displays free and used memory in MB.&lt;/span&gt;
free &lt;span class="nt"&gt;-m&lt;/span&gt;
&lt;span class="c"&gt;# Terminates a process.&lt;/span&gt;
&lt;span class="nb"&gt;kill&lt;/span&gt; &amp;lt;process &lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Running commands&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Runs command in the background.&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;command&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &amp;amp;
&lt;span class="c"&gt;# Displays background commands.&lt;/span&gt;
&lt;span class="nb"&gt;jobs&lt;/span&gt;
&lt;span class="c"&gt;# Brings command to the foreground.&lt;/span&gt;
&lt;span class="nb"&gt;fg&lt;/span&gt; &amp;lt;&lt;span class="nb"&gt;command &lt;/span&gt;number&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Service management&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Starts a service.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start &amp;lt;service&amp;gt;
&lt;span class="c"&gt;# Stops a service.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl stop &amp;lt;service&amp;gt;
&lt;span class="c"&gt;# Checks the status of a service.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl status &amp;lt;service&amp;gt;
&lt;span class="c"&gt;# Reloads a service’s configuration without interrupting its operation.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl reload &amp;lt;service&amp;gt;
&lt;span class="c"&gt;# Follows the journal, showing new log messages in real time.  &lt;/span&gt;
journalctl &lt;span class="nt"&gt;-f&lt;/span&gt;
&lt;span class="c"&gt;# Displays logs for a specific systemd unit.&lt;/span&gt;
journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; &amp;lt;unit_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Cron jobs and scheduling&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Edits cron jobs for the current user.&lt;/span&gt;
crontab &lt;span class="nt"&gt;-e&lt;/span&gt;
&lt;span class="c"&gt;# Lists cron jobs for the current user.&lt;/span&gt;
crontab &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Files&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;File management&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Lists files and directories.&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt;
&lt;span class="c"&gt;# Creates an empty file or updates the last accessed date.&lt;/span&gt;
&lt;span class="nb"&gt;touch&lt;/span&gt; &amp;lt;filename&amp;gt;
&lt;span class="c"&gt;# Copies files from source to destination.&lt;/span&gt;
&lt;span class="nb"&gt;cp&lt;/span&gt; &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &amp;lt;destination&amp;gt;
&lt;span class="c"&gt;# Moves files or renames them.&lt;/span&gt;
&lt;span class="nb"&gt;mv&lt;/span&gt; &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &amp;lt;destination&amp;gt;
&lt;span class="c"&gt;# Deletes a file.&lt;/span&gt;
&lt;span class="nb"&gt;rm&lt;/span&gt; &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Directory navigation&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Displays the current directory path.&lt;/span&gt;
&lt;span class="nb"&gt;pwd&lt;/span&gt;
&lt;span class="c"&gt;# Changes the current directory.&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; &amp;lt;directory&amp;gt;
&lt;span class="c"&gt;# Creates a new directory.&lt;/span&gt;
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &amp;lt;&lt;span class="nb"&gt;dirname&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;File permissions and ownership&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Changes file permissions.&lt;/span&gt;
&lt;span class="nb"&gt;chmod&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;who&lt;/span&gt;&lt;span class="o"&gt;][&lt;/span&gt;+/-][permissions] &amp;lt;file&amp;gt;
&lt;span class="c"&gt;# Makes a file executable by its owner.&lt;/span&gt;
&lt;span class="nb"&gt;chmod &lt;/span&gt;u+x &amp;lt;file&amp;gt;
&lt;span class="c"&gt;# Changes file owner and group.&lt;/span&gt;
&lt;span class="nb"&gt;chown&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;user]:[group] &amp;lt;file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Searching and finding&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Finds files and directories.&lt;/span&gt;
find &lt;span class="o"&gt;[&lt;/span&gt;directory] &lt;span class="nt"&gt;-name&lt;/span&gt; &amp;lt;search_pattern&amp;gt;
&lt;span class="c"&gt;# Searches for a pattern in files.&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &amp;lt;search_pattern&amp;gt; &amp;lt;file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Archiving and compression&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Compresses files into a tar.gz archive.&lt;/span&gt;
&lt;span class="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-czvf&lt;/span&gt; &amp;lt;name.tar.gz&amp;gt; &lt;span class="o"&gt;[&lt;/span&gt;files]
&lt;span class="c"&gt;# Extracts a compressed tar archive.&lt;/span&gt;
&lt;span class="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-xvf&lt;/span&gt; &amp;lt;name.tar.[gz|bz|xz]&amp;gt; &lt;span class="o"&gt;[&lt;/span&gt;destination]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Text editing and processing&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Opens a file in the Nano text editor.&lt;/span&gt;
nano &lt;span class="o"&gt;[&lt;/span&gt;file]
&lt;span class="c"&gt;# Displays the contents of a file.&lt;/span&gt;
&lt;span class="nb"&gt;cat&lt;/span&gt; &amp;lt;file&amp;gt;
&lt;span class="c"&gt;# Displays the paginated content of a file.&lt;/span&gt;
less &amp;lt;file&amp;gt;
&lt;span class="c"&gt;# Shows the first few lines of a file.&lt;/span&gt;
&lt;span class="nb"&gt;head&lt;/span&gt; &amp;lt;file&amp;gt;
&lt;span class="c"&gt;# Shows the last few lines of a file.&lt;/span&gt;
&lt;span class="nb"&gt;tail&lt;/span&gt; &amp;lt;file&amp;gt;
&lt;span class="c"&gt;# Prints every line in a file.&lt;/span&gt;
&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{print}'&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;file]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Packages&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Package management (APT)&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Installs a package.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &amp;lt;package&amp;gt;
&lt;span class="c"&gt;# Reinstalls a broken package.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nt"&gt;--reinstall&lt;/span&gt; &amp;lt;package&amp;gt;
&lt;span class="c"&gt;# Searches for APT packages.&lt;/span&gt;
apt search &amp;lt;package&amp;gt;
&lt;span class="c"&gt;# Lists available package versions.&lt;/span&gt;
apt-cache policy &amp;lt;package&amp;gt;
&lt;span class="c"&gt;# Updates package lists.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="c"&gt;# Upgrades all upgradable packages.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt upgrade
&lt;span class="c"&gt;# Removes a package.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt remove &amp;lt;package&amp;gt;
&lt;span class="c"&gt;# Removes a package and all its configuration files.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt purge &amp;lt;package&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Package management (Snap)&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Searches for Snap packages.&lt;/span&gt;
snap find &amp;lt;package&amp;gt;
&lt;span class="c"&gt;# Installs a Snap package.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;snap &lt;span class="nb"&gt;install&lt;/span&gt; &amp;lt;snap_name&amp;gt;
&lt;span class="c"&gt;# Removes a Snap package.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;snap remove &amp;lt;snap_name&amp;gt;
&lt;span class="c"&gt;# Updates all installed Snap packages.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;snap refresh
&lt;span class="c"&gt;# Lists all installed Snap packages.&lt;/span&gt;
snap list
&lt;span class="c"&gt;# Displays information about a Snap package.&lt;/span&gt;
snap info &amp;lt;snap_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Users &amp;amp; Groups&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;User management&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Shows which users are logged in.&lt;/span&gt;
w
&lt;span class="c"&gt;# Creates a new user.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;adduser &amp;lt;username&amp;gt;
&lt;span class="c"&gt;# Deletes a user.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;deluser &amp;lt;username&amp;gt;
&lt;span class="c"&gt;# Sets or changes the password for a user.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;passwd &amp;lt;username&amp;gt;
&lt;span class="c"&gt;# Switches user.&lt;/span&gt;
su &amp;lt;username&amp;gt;
&lt;span class="c"&gt;# Locks a user account.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;passwd &lt;span class="nt"&gt;-l&lt;/span&gt; &amp;lt;username&amp;gt;
&lt;span class="c"&gt;# Unlocks a user password.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;passwd &lt;span class="nt"&gt;-u&lt;/span&gt; &amp;lt;username&amp;gt;
&lt;span class="c"&gt;# Sets user password expiration date.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;chage &amp;lt;username&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Group management&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Displays user and group IDs.&lt;/span&gt;
&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;username]
&lt;span class="c"&gt;# Shows the groups a user belongs to.&lt;/span&gt;
&lt;span class="nb"&gt;groups&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;username]
&lt;span class="c"&gt;# Creates a new group.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;addgroup &amp;lt;groupname&amp;gt;
&lt;span class="c"&gt;# Deletes a group.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;delgroup &amp;lt;groupname&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Networking&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Networking Commands&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Displays network interfaces and IP addresses.&lt;/span&gt;
ip addr show
&lt;span class="c"&gt;# Shows network statistics.&lt;/span&gt;
ip &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nb"&gt;link&lt;/span&gt;
&lt;span class="c"&gt;# Shows listening sockets.&lt;/span&gt;
ss &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;span class="c"&gt;# Pings a host and outputs results.&lt;/span&gt;
ping &amp;lt;host&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Netplan Configuration&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Displays the current Netplan configuration.&lt;/span&gt;
&lt;span class="nb"&gt;cat&lt;/span&gt; /etc/netplan/&lt;span class="k"&gt;*&lt;/span&gt;.yaml
&lt;span class="c"&gt;# Tests a new configuration for a set period of time.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;netplan try
&lt;span class="c"&gt;# Applies the current Netplan configuration.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;netplan apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Firewall Management&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Displays the status of the firewall.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw status
&lt;span class="c"&gt;# Enables the firewall.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw &lt;span class="nb"&gt;enable&lt;/span&gt;
&lt;span class="c"&gt;# Disables the firewall.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw disable
&lt;span class="c"&gt;# Allows traffic on a specific port or service.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw allow &amp;lt;port/service&amp;gt;
&lt;span class="c"&gt;# Denies traffic on a specific port or service.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw deny &amp;lt;port/service&amp;gt;
&lt;span class="c"&gt;# Deletes an existing rule.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw delete allow/deny &amp;lt;port/service&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;SSH and Remote Access&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Connects to a remote host via SSH.&lt;/span&gt;
ssh &amp;lt;user@host&amp;gt;
&lt;span class="c"&gt;# Securely copies files between hosts.&lt;/span&gt;
scp &amp;lt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &amp;lt;user@host&amp;gt;:&amp;lt;destination&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;LXD&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;LXD is a modern, secure, and powerful tool that provides a unified experience for&lt;br&gt;
running and managing containers or virtual machines. Visit &lt;a href="https://canonical.com/lxd" rel="noopener noreferrer"&gt;LXD Official Site&lt;/a&gt; for more information.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Initialization&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Initializes LXD before first use.&lt;/span&gt;
lxd init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Creating Instances&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Creates a LXC system container (without starting it).&lt;/span&gt;
lxc init ubuntu:22.04 &amp;lt;container_name&amp;gt;

&lt;span class="c"&gt;# Creates and starts a LXC system container.&lt;/span&gt;
lxc launch ubuntu:24.04 &amp;lt;container_name&amp;gt;

&lt;span class="c"&gt;# Creates and starts a virtual machine.&lt;/span&gt;
lxc launch ubuntu:22.04 &amp;lt;vm_name&amp;gt; &lt;span class="nt"&gt;--vm&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Managing Instances&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Lists instances.&lt;/span&gt;
lxc list

&lt;span class="c"&gt;# Shows status information about an instance.&lt;/span&gt;
lxc info &amp;lt;instance&amp;gt;

&lt;span class="c"&gt;# Starts an instance.&lt;/span&gt;
lxc start &amp;lt;instance&amp;gt;

&lt;span class="c"&gt;# Stops an instance.&lt;/span&gt;
lxc stop &amp;lt;instance&amp;gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;--force&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;

&lt;span class="c"&gt;# Deletes an instance.&lt;/span&gt;
lxc delete &amp;lt;instance&amp;gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;--force&lt;/span&gt;|--interactive]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Accessing Instances&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Runs a command inside an instance.&lt;/span&gt;
lxc &lt;span class="nb"&gt;exec&lt;/span&gt; &amp;lt;instance&amp;gt; &lt;span class="nt"&gt;--&lt;/span&gt; &amp;lt;&lt;span class="nb"&gt;command&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;# Gets shell access to an instance (if bash is installed).&lt;/span&gt;
lxc &lt;span class="nb"&gt;exec&lt;/span&gt; &amp;lt;instance&amp;gt; &lt;span class="nt"&gt;--&lt;/span&gt; bash

&lt;span class="c"&gt;# Gets console access to an instance.&lt;/span&gt;
lxc console &amp;lt;instance&amp;gt; &lt;span class="o"&gt;[&lt;/span&gt;flags]

&lt;span class="c"&gt;# Pulls a file from an instance.&lt;/span&gt;
lxc file pull &amp;lt;instance&amp;gt;/&amp;lt;instance_filepath&amp;gt; &amp;lt;local_filepath&amp;gt;

&lt;span class="c"&gt;# Pushes a file to an instance.&lt;/span&gt;
lxc file push &amp;lt;local_filepath&amp;gt; &amp;lt;instance&amp;gt;/&amp;lt;instance_filepath&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Using Projects&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Creates a project.&lt;/span&gt;
lxc project create &amp;lt;project&amp;gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;--config&lt;/span&gt; &amp;lt;option&amp;gt;]

&lt;span class="c"&gt;# Configures a project.&lt;/span&gt;
lxc project &lt;span class="nb"&gt;set&lt;/span&gt; &amp;lt;project&amp;gt; &amp;lt;option&amp;gt;

&lt;span class="c"&gt;# Switches to a project.&lt;/span&gt;
lxc project switch &amp;lt;project&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Ubuntu Pro&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Ubuntu Pro delivers 10 years of expanded security coverage on top of Ubuntu’s Long Term&lt;br&gt;
Support (LTS) commitment in addition to management and compliance tooling. Visit &lt;a href="https://ubuntu.com/pro" rel="noopener noreferrer"&gt;Ubuntu Pro&lt;/a&gt; to register for free on up to five machines.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Activating Ubuntu Pro&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Attaches your machine to Ubuntu Pro using a specific token.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;pro attach &amp;lt;token&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Managing Services&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Displays the status of all Ubuntu Pro services.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;pro status

&lt;span class="c"&gt;# Enables a specific Ubuntu Pro service, like ESM, FIPS, or Livepatch.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;pro &lt;span class="nb"&gt;enable&lt;/span&gt; &amp;lt;service&amp;gt;

&lt;span class="c"&gt;# Disables a specific Ubuntu Pro service.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;pro disable &amp;lt;service&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Extended Security Maintenance (ESM)&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Activates Extended Security Maintenance for infrastructure packages.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;pro &lt;span class="nb"&gt;enable &lt;/span&gt;esm-infra

&lt;span class="c"&gt;# Activates ESM for applications, extending security coverage.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;pro &lt;span class="nb"&gt;enable &lt;/span&gt;esm-apps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Livepatch Service&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Enables the Livepatch service, which applies critical kernel patches without rebooting.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;pro &lt;span class="nb"&gt;enable &lt;/span&gt;livepatch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;FIPS Mode&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Enables FIPS (Federal Information Processing Standards) mode, enforcing strict cryptographic standards.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;pro &lt;span class="nb"&gt;enable &lt;/span&gt;fips
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Updating Configuration&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Refreshes the Ubuntu Pro state to ensure the latest configuration and services are in place.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;pro refresh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Detaching Ubuntu Pro&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Detaches the machine from Ubuntu Pro, disabling all services.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;pro detach
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a complete and structured Ubuntu CLI cheat sheet.&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>cli</category>
      <category>cheatsheet</category>
      <category>linux</category>
    </item>
    <item>
      <title>5 Cybersecurity Projects Every Computer Science Student Should Try</title>
      <dc:creator>JZTN</dc:creator>
      <pubDate>Tue, 04 Feb 2025 13:02:24 +0000</pubDate>
      <link>https://dev.to/jeztn/5-cybersecurity-projects-every-computer-science-student-should-try-34i2</link>
      <guid>https://dev.to/jeztn/5-cybersecurity-projects-every-computer-science-student-should-try-34i2</guid>
      <description>&lt;p&gt;As a computer science student passionate about cybersecurity, I’ve discovered that hands-on projects are the best way to learn. Theory is essential, but nothing beats the experience of building something tangible. In this guide, I’ll share five practical projects that will help you build a strong foundation in cybersecurity while creating an impressive portfolio.&lt;/p&gt;

&lt;p&gt;Whether you’re a beginner or looking to sharpen your skills, these projects will challenge you and deepen your understanding of key cybersecurity concepts. Let’s dive in!&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. Network Packet Sniffer&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Every cybersecurity enthusiast should start by understanding network traffic. Building a packet sniffer is an excellent way to learn the fundamentals of network protocols and data transmission.&lt;/p&gt;

&lt;p&gt;What You’ll Learn:&lt;/p&gt;

&lt;p&gt;Network protocols (TCP/IP, UDP)&lt;br&gt;
Packet structure and analysis&lt;br&gt;
Socket programming&lt;br&gt;
Traffic monitoring techniques&lt;br&gt;
Tools &amp;amp; Technologies:&lt;/p&gt;

&lt;p&gt;Python with Scapy library&lt;br&gt;
Wireshark (for verification)&lt;br&gt;
Basic networking knowledge&lt;br&gt;
The beauty of this project lies in its simplicity to start but vast potential for expansion. Begin with capturing basic HTTP traffic, then advance to protocol analysis and packet filtering.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. Simple Intrusion Detection System (IDS)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Creating a basic IDS helps you understand how to detect potential security threats in real-time. This project is a great way to explore system monitoring and threat detection.&lt;/p&gt;

&lt;p&gt;Key Features to Implement:&lt;/p&gt;

&lt;p&gt;Log file monitoring&lt;br&gt;
Pattern matching for known attacks&lt;br&gt;
Alert system for suspicious activities&lt;br&gt;
Basic threat classification&lt;br&gt;
Learning Outcomes:&lt;/p&gt;

&lt;p&gt;System log analysis&lt;br&gt;
Regular expressions&lt;br&gt;
Real-time monitoring&lt;br&gt;
Threat detection algorithms&lt;br&gt;
Start small by monitoring SSH login attempts, then gradually add more detection rules and features.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. Password Strength Checker&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;While it might sound basic, building a comprehensive password validator teaches crucial security concepts. This project is a great way to explore cryptography and user input validation.&lt;/p&gt;

&lt;p&gt;Implementation Aspects:&lt;/p&gt;

&lt;p&gt;Multiple validation criteria&lt;br&gt;
Dictionary attack prevention&lt;br&gt;
Hash function implementation&lt;br&gt;
Password entropy calculation&lt;br&gt;
Skills Gained:&lt;/p&gt;

&lt;p&gt;Cryptography basics&lt;br&gt;
Security best practices&lt;br&gt;
User input validation&lt;br&gt;
Data protection standards&lt;br&gt;
This project perfectly combines security theory with practical application.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. File Integrity Monitor&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A file integrity monitoring system teaches you about system security and change detection. This is a critical skill for identifying unauthorized modifications to files.&lt;/p&gt;

&lt;p&gt;Core Features:&lt;/p&gt;

&lt;p&gt;File hash calculation&lt;br&gt;
Real-time monitoring&lt;br&gt;
Change logging&lt;br&gt;
Alert system&lt;br&gt;
Technical Learning:&lt;/p&gt;

&lt;p&gt;Cryptographic hashing&lt;br&gt;
File system operations&lt;br&gt;
Background processes&lt;br&gt;
Database management&lt;br&gt;
This project demonstrates how to detect unauthorized system modifications — a crucial security skill.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;5. Security Information and Event Management (SIEM) Lite&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Creating a simplified SIEM system brings together multiple security concepts. This project is ideal for understanding log aggregation, event correlation, and security analytics.&lt;/p&gt;

&lt;p&gt;Project Components:&lt;/p&gt;

&lt;p&gt;Log aggregation&lt;br&gt;
Event correlation&lt;br&gt;
Basic analytics&lt;br&gt;
Reporting system&lt;br&gt;
Benefits:&lt;/p&gt;

&lt;p&gt;System integration experience&lt;br&gt;
Data analysis skills&lt;br&gt;
Alert management&lt;br&gt;
Security event handling&lt;br&gt;
While not as complex as commercial SIEM solutions, this project teaches fundamental security monitoring principles.&lt;/p&gt;

&lt;p&gt;Getting Started Tips&lt;br&gt;
Set Up a Lab Environment&lt;br&gt;
Use virtual machines to create isolated testing environments.&lt;br&gt;
Practice safe testing and avoid targeting unauthorized systems.&lt;br&gt;
Version Control&lt;br&gt;
Use Git from day one to track your progress.&lt;br&gt;
Document your work and share your code responsibly.&lt;br&gt;
Security First&lt;br&gt;
Always test in isolated environments.&lt;br&gt;
Follow ethical guidelines and respect privacy.&lt;br&gt;
Learn from the Community&lt;br&gt;
Join cybersecurity forums and communities.&lt;br&gt;
Participate in Capture the Flag (CTF) challenges.&lt;br&gt;
Share your experiences and learn from others.&lt;br&gt;
Conclusion&lt;br&gt;
These five projects provide a solid foundation in practical cybersecurity. Remember, the goal isn’t just to complete them, but to understand the underlying security principles. Start with basic implementations and gradually add complexity as your understanding grows.&lt;/p&gt;

&lt;p&gt;What’s next? Pick a project that interests you most and start coding. Each project can be as simple or complex as you make it — the key is to begin and keep improving.&lt;/p&gt;

&lt;p&gt;Happy coding and stay secure! 🛡️&lt;/p&gt;

&lt;p&gt;About the Author:&lt;br&gt;
I’m a cybersecurity enthusiast and computer science student passionate about sharing experiences and knowledge with the community. Follow me for more insights into cybersecurity, programming, and technology!&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>programming</category>
      <category>computerscience</category>
      <category>security</category>
    </item>
  </channel>
</rss>
