<?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: chenchih</title>
    <description>The latest articles on DEV Community by chenchih (@chenchih).</description>
    <link>https://dev.to/chenchih</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%2F40084%2F8056b0ce-7024-4437-a1d1-6e20f194bda3.jpg</url>
      <title>DEV Community: chenchih</title>
      <link>https://dev.to/chenchih</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chenchih"/>
    <language>en</language>
    <item>
      <title>HomeBrew command Note</title>
      <dc:creator>chenchih</dc:creator>
      <pubDate>Sun, 21 Sep 2025 07:08:28 +0000</pubDate>
      <link>https://dev.to/chenchih/homebrew-command-note-g3p</link>
      <guid>https://dev.to/chenchih/homebrew-command-note-g3p</guid>
      <description>&lt;p&gt;I’d like to share some brew commands. This command is used on macOS, similar to winget on Windows, and allows you to download packages or tools&lt;/p&gt;

&lt;h1&gt;
  
  
  Install Homebrew
&lt;/h1&gt;

&lt;p&gt;Please refer to this &lt;a href="https://brew.sh/" rel="noopener noreferrer"&gt;link&lt;/a&gt; to install Homebrew. Just copy and paste the command into your terminal, and it will install automatically. You need to complete this step; otherwise, you won’t be able to use the brew command&lt;/p&gt;

&lt;h2&gt;
  
  
  brew command for cli tools
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;brew&lt;/code&gt; command is use to installs CLI tools / libraries / packages. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;syntax: &lt;code&gt;brew install &amp;lt;pkg&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Below are some of the commonly use and example of using brew to install&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install git
brew install python
brew install node
brew install wget
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;list installed tool:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;uninstall installed tool
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew uninstall git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  brew clask for application
&lt;/h2&gt;

&lt;p&gt;Installs GUI/macOS applications (things you’d normally drag into /Applications)&lt;/p&gt;

&lt;p&gt;Casks are built into Homebrew core.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;syntax: &lt;code&gt;brew install --cask &amp;lt;app&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  install other applciation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install --cask iterm2
brew install --cask google-chrome
brew install --cask visual-studio-code
brew install --cask slack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  List installed casks:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew list --cask
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  search applications
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew search &amp;lt;name&amp;gt;
#ex:
brew search iterm2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  uninstall application
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew uninstall --cask iterm2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Dedeprecated (not support)
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;No need to tap &lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Before (old Homebrew, pre-2020) install like this using  use &lt;code&gt;tap&lt;/code&gt; like below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew tap caskroom/cask
brew cask install &amp;lt;app&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  compare using brew and web to download:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Website download = manual management (install/update/uninstall yourself).&lt;/li&gt;
&lt;li&gt;Homebrew cask = automated management (install/update/uninstall with commands).&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Website download
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always the latest official release direct from the developer.&lt;/li&gt;
&lt;li&gt;No dependency on Homebrew.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manual updates → you have to check for new versions yourself.&lt;/li&gt;
&lt;li&gt;Harder to uninstall completely (you need to delete app + configs manually).&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  brew
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Pro&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy updates with brew upgrade (brew checks and installs new versions).&lt;/li&gt;
&lt;li&gt;Scriptable → useful for setting up a new Mac quickly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sometimes the version in Homebrew can lag behind the website by a few hours/days.&lt;/li&gt;
&lt;li&gt;Requires Homebrew to be installed.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;CLI tool → brew install&lt;/p&gt;

&lt;p&gt;GUI app → brew install --cask&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>homebrew</category>
      <category>macbook</category>
      <category>tool</category>
    </item>
    <item>
      <title>Setup GenieACS under Ubuntu24.04</title>
      <dc:creator>chenchih</dc:creator>
      <pubDate>Tue, 19 Aug 2025 00:55:25 +0000</pubDate>
      <link>https://dev.to/chenchih/setup-genieacs-under-ubuntu2404-44oi</link>
      <guid>https://dev.to/chenchih/setup-genieacs-under-ubuntu2404-44oi</guid>
      <description>&lt;h1&gt;
  
  
  Setup GenieACS
&lt;/h1&gt;

&lt;p&gt;There are many setup tutorials on setup genieacs on internet; however, some of them use the 20.04 Ubuntu version. I like to show using 22.04 on some settings, some of the configure are different, especially with the MongoDB and genieacs configure. &lt;/p&gt;

&lt;p&gt;I have write an automation script to run it without setting it, which support ubuntu 20.04, 22.04, and 24.04. The biggest difference between different versions of Ubuntu is &lt;code&gt;libssl&lt;/code&gt; and mogodb version. Please referto  this &lt;a href="https://github.com/chenchih/Env_Setup_Note/tree/master/Linux_SetEnv/GenieACS" rel="noopener noreferrer"&gt;link &lt;/a&gt;for the script. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0nxzly7y85kmlcyq3wi1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0nxzly7y85kmlcyq3wi1.png" alt=" " width="418" height="706"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment
&lt;/h2&gt;

&lt;p&gt;HW: Raspberry Pi 5&lt;br&gt;
OS: Ubuntu 24.04 ARM&lt;/p&gt;
&lt;h3&gt;
  
  
  Check Ubuntu Version
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;lsb_release -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy0jz8li74youpfghcfnf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy0jz8li74youpfghcfnf.png" alt=" " width="573" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Check Kernel
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;uname -ar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6053kuoqxmnig7kdie4i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6053kuoqxmnig7kdie4i.png" alt=" " width="800" height="46"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgx5qzsec80z1oa5yv98y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgx5qzsec80z1oa5yv98y.png" alt=" " width="555" height="246"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Check HW
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;check model
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat /proc/device-tree/model
#or
cat /proc/cpuinfo | grep 'Model'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Check CPU type
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;lscpu
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiv7z0mfb0duf14mx1gvg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiv7z0mfb0duf14mx1gvg.png" alt=" " width="800" height="313"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. Install node.js
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
node -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  2. Install MongoDB
&lt;/h3&gt;

&lt;p&gt;Note: In Ubuntu 24.04 the SSL default uses &lt;code&gt;libssl3&lt;/code&gt;,  so you don't need to install. I mention it here because many tutorials mention installing libssl, if you install will encounter an  error. &lt;/p&gt;

&lt;p&gt;Check your SSL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dpkg -l | grep libssl3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0iy9dd12znqheelbfuym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0iy9dd12znqheelbfuym.png" alt=" " width="800" height="134"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2.1 Import the MongoDB GPG Key
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#update
sudo apt update 
#install curl
sudo apt install gnupg curl -y 
#use curl to download MongoDB
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \ sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \ --dearmor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2.2 Add the MongoDB Repository
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list

sudo apt update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2.3 Install MongoDB
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install -y mongodb-org
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2.4 Start and Enable the MongoDB Service
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl start mongod 
sudo systemctl enable mongod 
sudo systemctl status mongod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.  Install GenieACS
&lt;/h3&gt;

&lt;p&gt;You can refer  &lt;a href="http://docs.genieacs.com/en/latest/installation-guide.html#install-genieacs" rel="noopener noreferrer"&gt;genieacs official site for more details&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt install nodejs npm

sudo npm install -g genieacs@1.2.13
sudo useradd --system --no-create-home --user-group genieacs

mkdir /opt/genieacs
mkdir /opt/genieacs/ext
chown genieacs:genieacs /opt/genieacs/ext
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. genieacs setting
&lt;/h3&gt;

&lt;h4&gt;
  
  
  4.1 modify &lt;code&gt;genieacs.env&lt;/code&gt;
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;vi /opt/genieacs/genieacs.env&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GENIEACS_CWMP_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-cwmp-access.log
GENIEACS_NBI_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-nbi-access.log
GENIEACS_FS_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-fs-access.log
GENIEACS_UI_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-ui-access.log
GENIEACS_DEBUG_FILE=/var/log/genieacs/genieacs-debug.yaml
NODE_OPTIONS=--enable-source-maps
GENIEACS_EXT_DIR=/opt/genieacs/ext
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4.2 Set file ownership and permissions
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo chown genieacs:genieacs /opt/genieacs/genieacs.env
sudo chmod 600 /opt/genieacs/genieacs.env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4.3 adding jwt secret
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node -e "console.log(\"GENIEACS_UI_JWT_SECRET=\" + require('crypto').randomBytes(128).toString('hex'))" &amp;gt;&amp;gt; /opt/genieacs/genieacs.env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you don't add this one will occur error when accessing genieacs url like below: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgg6hhsq64dbbks16lche.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgg6hhsq64dbbks16lche.png" alt=" " width="688" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4.4 Create logs directory
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir /var/log/genieacs
chown genieacs:genieacs /var/log/genieacs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4.5 Create systemd unit files
&lt;/h3&gt;

&lt;h4&gt;
  
  
  4.5.1 Run the following command to create genieacs-cwmp service
&lt;/h4&gt;

&lt;p&gt;you can use the &lt;code&gt;which genieacs-cwmp&lt;/code&gt; to check the location and paste in below ExecStart option.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;sudo systemctl edit --force --full genieacs-cwmp&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Unit]
Description=GenieACS CWMP
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/usr/bin/genieacs-cwmp

[Install]
WantedBy=default.target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4.5.2  Create genieacs-nbi service
&lt;/h4&gt;

&lt;p&gt;you can use the &lt;code&gt;which genieacs-nbi&lt;/code&gt; to check the location and paste in below ExecStart option.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;sudo systemctl edit --force --full genieacs-nbi&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Unit]
Description=GenieACS NBI
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/usr/bin/genieacs-nbi
ExecStart=/usr/local/bin/genieacs-nbi

[Install]
WantedBy=default.target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.5.3 Create genieacs-fs service&lt;br&gt;
you can use the &lt;code&gt;which genieacs-fs&lt;/code&gt; to check the location and paste in below ExecStart option.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;sudo systemctl edit --force --full genieacs-fs&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Unit]
Description=GenieACS FS
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart =/usr/local/bin/genieacs-fs

[Install]
WantedBy=default.target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.5.4 Create genieacs-ui service:&lt;/p&gt;

&lt;p&gt;you can use the &lt;code&gt;which genieacs-ui&lt;/code&gt; to check the location and paste ExecStart&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;sudo systemctl edit --force --full genieacs-ui&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Unit]
Description=GenieACS UI
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/usr/local/bin/genieacs-ui 

[Install]
WantedBy=default.target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.5.5 configure log file rotation using logrotate&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;nano /etc/logrotate.d/genieacs&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/var/log/genieacs/*.log /var/log/genieacs/*.yaml {
    daily
    rotate 30
    compress
    delaycompress
    dateext
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4.5.6 Enable and start services
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl enable genieacs-cwmp
sudo systemctl start genieacs-cwmp
sudo systemctl status genieacs-cwmp

sudo systemctl enable genieacs-nbi
sudo systemctl start genieacs-nbi
sudo systemctl status genieacs-nbi

sudo systemctl enable genieacs-fs
sudo systemctl start genieacs-fs
sudo systemctl status genieacs-fs

sudo systemctl enable genieacs-ui
sudo systemctl start genieacs-ui
sudo systemctl status genieacs-ui
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should be running all 4 services. &lt;/p&gt;

&lt;h2&gt;
  
  
  4.5.7 access to the geniacs &lt;a href="http://IPaddress:3000" rel="noopener noreferrer"&gt;http://IPaddress:3000&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;You can use this command to check host or IP: &lt;code&gt;hostname -I&lt;/code&gt; or &lt;code&gt;ip a&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcddajbihz5xzlw5kqome.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcddajbihz5xzlw5kqome.png" alt=" " width="761" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want your cpe to connect to genieacs your url must add port 7547&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;http://genieIPADD:7547&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It should work now, and look like below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0e2ctu2m0fxv1a3b0f1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0e2ctu2m0fxv1a3b0f1w.png" alt=" " width="750" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;It should have a great understand on how to setup geniacs server, an easy way. I have been encouter many issue especially with libssl and mogobdb on differeent Ubuntu version. I literally have figure out what causes the problem, the version not support. &lt;/p&gt;

&lt;p&gt;Lastly thanks for reading my post, any question please free to leave comment. &lt;/p&gt;

&lt;h2&gt;
  
  
  Reference:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/genieacs/genieacs" rel="noopener noreferrer"&gt;https://github.com/genieacs/genieacs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=nH-bIBNEPBs" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=nH-bIBNEPBs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ubuntu</category>
      <category>acs</category>
      <category>genieacs</category>
      <category>raspberrypi</category>
    </item>
    <item>
      <title>NGINX HTTP Server</title>
      <dc:creator>chenchih</dc:creator>
      <pubDate>Tue, 05 Aug 2025 03:21:45 +0000</pubDate>
      <link>https://dev.to/chenchih/nginx-http-server-361e</link>
      <guid>https://dev.to/chenchih/nginx-http-server-361e</guid>
      <description>&lt;p&gt;Let me show you how to setup HTTP the most easy way using NGINX. I used to setup HTTP with Apache or other related tool, but it seem like NGINX is much easier. &lt;/p&gt;

&lt;h1&gt;
  
  
  NGINX HTTP Server
&lt;/h1&gt;

&lt;p&gt;Below are the basic configure version: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OS: ubuntu 20.04&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1. Install Nginx:
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;sudo apt install nginx -y&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step2 Verify Nginx is Running show statusd
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl status nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx98ozu2gmvuwyg4hyw8k.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx98ozu2gmvuwyg4hyw8k.PNG" alt=" " width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3.Adjust Firewall (UFW - if active):
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw allow 'Nginx HTTP'
sudo ufw reload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Test Nginx from your browser (Optional but Recommended):
&lt;/h2&gt;

&lt;p&gt;please navigate your web browser using your local IP it should occur index page&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://172.21.201.250
or 
http://127.0.0.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fov62y5aa65xewd0z43ga.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fov62y5aa65xewd0z43ga.PNG" alt=" " width="800" height="195"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5. set permission
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo chmod 644 /var/www/html/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 6. Edit ngix configure to allow index to show like file management
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /etc/nginx/sites-available/default
    location / {
        try_files $uri $uri/ =404;
        autoindex on; # &amp;lt;--- Add this line
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 7. Test Nginx configuration for syntax errors:
&lt;/h2&gt;

&lt;p&gt;when you change your configure you can verify whether it will occur error or not.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nginx -t
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 8. Reload Nginx to apply changes
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl reload nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 9. Change your index into file management
&lt;/h2&gt;

&lt;p&gt;Default will have &lt;code&gt;index.nginx-debian.html&lt;/code&gt; in &lt;code&gt;/var/www/html&lt;/code&gt; directory. Make sure there's no &lt;code&gt;.html&lt;/code&gt; file in directory, it will treat any html file as index. I will rename html file ext  into bk. You no need to delete it, maybe in future you want to use again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo mv /var/www/html/index.nginx-debian.html /var/www/html/index.nginx-debian.html.bak
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 10. Access to your site will show like File Management, display all your files or folder.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdvrlmszjitl79h82krpf.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdvrlmszjitl79h82krpf.PNG" alt=" " width="800" height="194"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>http</category>
      <category>nginx</category>
      <category>tutorial</category>
      <category>ubuntu</category>
    </item>
    <item>
      <title>Oh My Posh- Powershell Terminal Setup</title>
      <dc:creator>chenchih</dc:creator>
      <pubDate>Mon, 17 Jun 2024 03:38:22 +0000</pubDate>
      <link>https://dev.to/chenchih/oh-my-posh-powershell-terminal-setup-mfj</link>
      <guid>https://dev.to/chenchih/oh-my-posh-powershell-terminal-setup-mfj</guid>
      <description>&lt;p&gt;I would like to share how to set up a fancy and productive terminal prompt under Windows PowerShell. Many people who have ever used Linux or Mac, will notice some great command, whereas the window command is not useful. Today I would like to show a tutorial on how to set up &lt;code&gt;oh-my-posh&lt;/code&gt; environment. &lt;/p&gt;

&lt;p&gt;If you ever use Linux/mac probably have heard of &lt;code&gt;oh-my-zsh&lt;/code&gt;, it also makes our prompt to be more fancy. In &lt;code&gt;oh-my-zsh&lt;/code&gt; it only supports &lt;code&gt;zsh&lt;/code&gt; shell, but &lt;code&gt;oh-my-posh&lt;/code&gt; supports many shells, but most people use it under the window. Both of these frameworks are used not just to fancy our terminal but also to let us be more productive when using &lt;code&gt;cli&lt;/code&gt; command. &lt;code&gt;Cli&lt;/code&gt; command means you can use the command to achieve many stuff without using the UI interface, which includes copy, filter, delete, rename, and many more.  &lt;/p&gt;

&lt;h1&gt;
  
  
  1. Install Window Terminal and PowerShell
&lt;/h1&gt;

&lt;p&gt;Before setting up oh-my-posh you need to install the window terminal and Powershell first. The default window provides you powershell which it's version 5.x version. You will need to install Powershell 7.x version which is typically named PowerShell core. &lt;/p&gt;

&lt;p&gt;Powershell core supports many more functions in plugins, if not used it might occur error when installing and importing plugins. Window Terminal allows our prompt to display properly with the nerd font or fancy logo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Window Terminal
&lt;/h2&gt;

&lt;p&gt;There are two methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store: access Microsoft and type Window Terminal&lt;/li&gt;
&lt;li&gt;Winget:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;winget install Microsoft.WindowsTerminal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are two methods:&lt;/p&gt;

&lt;h2&gt;
  
  
  Powershell
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Store: access Microsoft and type Power Shell&lt;/li&gt;
&lt;li&gt;Winget:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;winget install Microsoft.Powershell
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Window package installation
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Winget
&lt;/h2&gt;

&lt;p&gt;In case your &lt;code&gt;winget&lt;/code&gt; is not able to use it, please download and install it under this link:&lt;/p&gt;

&lt;p&gt;Step 1: Download under this link&lt;br&gt;
Please use either link ok:&lt;br&gt;
&lt;a href="https://learn.microsoft.com/en-us/windows/package-manager/winget/" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/windows/package-manager/winget/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/microsoft/winget-cli/releases" rel="noopener noreferrer"&gt;https://github.com/microsoft/winget-cli/releases&lt;/a&gt;&lt;br&gt;
The file will look like &lt;code&gt;Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step2: Install by command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Add -AppPackage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you ever meet &lt;code&gt;Fail-Error Execution Policies&lt;/code&gt;, probably it might be the policy problem, please change it to remote&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;check the current policy:  &lt;code&gt;Get-ExecutionPolicy -List&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined
 LocalMachine    RemoteSigned
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;set policy: &lt;code&gt;Set-ExecutionPolicy RemoteSigned&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For more detail on each policy, please refer &lt;a href="https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.4" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Restricted (Default): No scripts are allowed to run, not even ones you write yourself.&lt;/li&gt;
&lt;li&gt;RemoteSigned: This allows scripts signed by a trusted source (like Microsoft) to run. It's like having a guard who checks IDs – only scripts with valid "signatures" (like an artist's signature) are allowed. Scripts you write yourself wouldn't work unless you sign them with a special certificate. Files that are downloaded from the internet must be signed by a trusted publisher or must be unblocked&lt;/li&gt;
&lt;li&gt;AllSigned: This allows any script with a valid signature to run, regardless of who signed it. It's less secure than RemoteSigned because it trusts any "signature," even from unknown sources. Imagine a guard who just checks for a valid ID but doesn't care who issued it. Scripts must be signed by a trusted publisher, like Microsoft or a well-known software vendor. Think of it like a document requiring a verified signature from a recognized authority.&lt;/li&gt;
&lt;li&gt;Bypass (Not Recommended): This completely disables script execution restrictions. It's like having no security guard at all! Any script can run, which is very risky and not recommended unless you fully understand the potential dangers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  2. Oh-My-Posh setup
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Step1: install Nerd Font
&lt;/h2&gt;

&lt;p&gt;Please download either of the link below to download and install nerd font:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Download:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/ryanoasis/nerd-fonts" rel="noopener noreferrer"&gt;https://github.com/ryanoasis/nerd-fonts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.nerdfonts.com/font-downloads" rel="noopener noreferrer"&gt;https://www.nerdfonts.com/font-downloads&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;


&lt;/blockquote&gt;

&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Install: &lt;br&gt;&lt;br&gt;
Extract the file and right-click to install or drag into &lt;code&gt;C:\Windows\Fonts&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step2: Window terminal setting
&lt;/h2&gt;

&lt;p&gt;Navigate window terminal and set below setting: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Startup: Default set PowerShell, Deafualt terminal: window terminal. &lt;br&gt;
Setting like below picture:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnbybi5ihngr6zfy1mov.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnbybi5ihngr6zfy1mov.png" alt=" " width="800" height="251"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Appearance&lt;br&gt;
Access to powershell&amp;gt;appearance&amp;gt; change &lt;code&gt;fontface&lt;/code&gt; to &lt;code&gt;nerd font&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step3: install oh-my-posh
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Install Oh-my-posh
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;winget install JanDeDobbeleer.OhMyPosh -s winget
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;update the latest version
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;winget upgrade JanDeDobbeleer.OhMyPosh -s winget
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After installing it press &lt;code&gt;Oh-my-posh&lt;/code&gt; on the terminal to check command works or not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step4: activate theme
&lt;/h2&gt;

&lt;p&gt;activate default theme&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;oh-my-posh init pwsh | invoke-expression
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;list all the theme look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Get-PoshThemes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or display all theme location and filename&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Get-PoshThemes –List
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change theme according to above theme filename&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\iterm2.omp.json" | Invoke-Expression
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step5: prompt setting writing profile
&lt;/h2&gt;

&lt;p&gt;We need to create profile to write the theme in it. in Step4 it will only take effect on that session temporary, when reopening new session the command you enter like theme will be lost remain default. &lt;/p&gt;

&lt;p&gt;profile location of different poweshell: &lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PS5.1&lt;/strong&gt;: &lt;code&gt;C:\Users\test\Documents\WindowsPowerShell&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PS7.1&lt;/strong&gt;: &lt;code&gt;C:\Users\test\Documents\PowerShell&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;generate a file: will only generate an empty file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;New-Item -Path $PROFILE -Type File –Force
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You need to modify the file using &lt;code&gt;notepad $profile&lt;/code&gt;, you can change Notepad to any you prefer text editor. The &lt;code&gt;$profile&lt;/code&gt; will automatically open the file it generates, which no need to type the full path of the profile location. &lt;/p&gt;

&lt;p&gt;Add your previous command on changing the theme to your profile&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\iterm2.omp.json" | Invoke-Expression
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also assign the full path of the theme below i mention many examples of assigned themes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#full path
$themepath = 'C:\Users\test\Documents\PowerShell\shanselman_v3-v2.json'
oh-my-posh --init --shell pwsh --config $themepath | Invoke-Expression

# URL 
oh-my-posh init pwsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/jandedobbeleer.omp.json' | Invoke-Expression

# same location as $profile 
$omp_config = Join-Path $PSScriptRoot ".\theme.json"
oh-my-posh --init --shell pwsh --config $omp_config | Invoke-Expression
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You might wonder how the &lt;code&gt;$env&lt;/code&gt; knows the full path of the default theme, it's because it's an environment variable in powershell, you can use this command to check the env variable and path.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ChildItem env:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1rc5wxsz69k4jtht1sfc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1rc5wxsz69k4jtht1sfc.png" alt=" " width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: You can set and remove an $env variable using the below command. But this will only take effect if you write into &lt;code&gt;$profile&lt;/code&gt;, or in the command(temporary). If you set the env but not add into $profile will not take effect.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#set $env
Set-Item -Path env:MYCUSTOMVAR –Value &amp;lt;path location&amp;gt;

#remove
$env:&amp;lt;name&amp;gt; = $null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step6 add some function or alias to profile
&lt;/h2&gt;

&lt;p&gt;Now we can assign some Linux commands to alias, which you can use Linux commands on PowerShell. You will be using a lot of the $profile in the plugin, just think it's a configuration of PowerShell. &lt;/p&gt;

&lt;p&gt;Before setting the alias or functions, let's install git and node, it's optional but if you want to add git to the alias, it is highly recommended you install it here. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install git
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; winget install --id Git.Git -e --source winget
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Install nodejs
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; WINGET INSTALL OPENJS.NODEJS.ltS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Alias
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Set-alias tt tree
Set -Alias ll ls
Set-Alias g git
#Set alias vim nvim
Set-Alias grep findstr
Set-Alias tig 'C:\Program Files\Git\usr\bin\tig.exe'
Set-Alias less 'C:\Program Files\Git\usr\bin\less.exe' 

# Ultilities (Optional)
function which ($command) {
    Get-Command -Name $command -ErrorAction SilentlyContinue |
        Select-Object -ExpandProperty Path -ErrorAction SilentlyContinue
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Function
&lt;/h3&gt;

&lt;p&gt;adding function can be alternative of alias&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function getenv{
Get-ChildItem env: 
}

function head {
  param($Path, $n = 10)
  Get-Content $Path -Head $n
}

function tail {
  param($Path, $n = 10)
  Get-Content $Path -Tail $n
}

function grep($regex, $dir) {
    if ( $dir ) {
        Get-ChildItem $dir | select-string $regex
        return
    }
    $input | select-string $regex
}

function df {
    get-volume
}
#get $env variable
function getenv {ChildItem env:}

# Git Shortcuts
function gs { git status }
function ga { git add . }
function gc { param($m) git commit -m "$m" }
function gp { git push }
function g { z Github }
function gcom {
    git add .
    git commit -m "$args"
}
function lazyg {
    git add .
    git commit -m "$args"
    git push
}

# adding hosts shortcut 
function hosts { notepad c:\windows\system32\drivers\etc\hosts }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you are interested in the profile, please refer to my profile on this &lt;a href="https://github.com/chenchih/Env_Setup_Note/blob/master/Terminal/ohmyposh/Microsoft.PowerShell_profile.ps1" rel="noopener noreferrer"&gt;link&lt;/a&gt;. &lt;/p&gt;

&lt;h1&gt;
  
  
  3. Plugin
&lt;/h1&gt;

&lt;p&gt;There are many more plugins, but I will choose only those I think are commonly used by people or developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Terminal Icons
&lt;/h2&gt;

&lt;p&gt;Display icon according to file type&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;install module&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Install-Module -Name Terminal-Icons -Repository PSGallery -Force
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;import module&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Import-Module Terminal-Icons
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What will it look like, please refer below picture.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyvytgwwd03kn66wcid76.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyvytgwwd03kn66wcid76.png" alt=" " width="800" height="285"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  psreadline(Autocompletion)
&lt;/h2&gt;

&lt;p&gt;This is a powerful module, which has many functions on it. I will not use all of them, I will only pick important ones or useful ones. If you’re interested you can study on the &lt;a href="https://learn.microsoft.com/en-us/powershell/module/psreadline/?view=powershell-7.4" rel="noopener noreferrer"&gt;official site&lt;/a&gt;. PSReadline basely is developed by Microsoft and used under PowerShell.&lt;/p&gt;

&lt;p&gt;You can use this command to get the default hotkey: &lt;code&gt;Get-PSReadLineKeyHandler&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;install module&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Install-Module PSREadLine -Force
#or below more detail which recommends 
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Import module&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#method1
Import-Module PSReadLine
#method2
if ($host.Name -eq 'ConsoleHost')
{
    Import-Module PSReadLine
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;all psreadline plugin
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Set-PSReadLineOption -EditMode Windows
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineKeyHandler -key Tab -Function Complete
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
Set-PSReadlineKeyHandler -Chord ctrl+x -Function ViExit
Set-PSReadLineKeyHandler -Chord 'Ctrl+d' -Function DeleteChar   
Set-PSReadlineKeyHandler -Chord ctrl+w -Function BackwardDeleteWord
Set-PSReadlineKeyHandler -Chord ctrl+e -Function EndOfLine
Set-PSReadlineKeyHandler -Chord ctrl+a -Function BeginningOfLine
Set-PSReadLineKeyHandler -Key Alt+B -Function SelectShellBackwardWord
Set-PSReadLineKeyHandler -Key Alt+F -Function SelectShellForwardWord

# CaptureScreen is good for blog posts or emails showing a transaction
# of what you did when asking for help or demonstrating a technique.
#ctrl+c and ctrl+d  to copy terminal 
#ctrl+v to paste
Set-PSReadLineKeyHandler -Chord 'Ctrl+d,Ctrl+c' -Function CaptureScreen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you feel like the color is too light can't read it might be the color, so you can add the color like below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Set-PSReadLineOption -Colors @{
    Command = 'Yellow'
    Parameter = 'Green'
    String = 'DarkCyan'
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Zoxide(directory jumper)
&lt;/h2&gt;

&lt;p&gt;This lets you navigate the file system based on your cd command history, which just renumber your last command’s directory. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Install-Module -Name Z –Force&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So imagine every time go to a specific location like &lt;code&gt;cd C:\Users\User\Downloads&lt;/code&gt;&lt;br&gt;
But if we visit the directory once, it will remember it, so next time you can just type &lt;code&gt;z&lt;/code&gt; with the directory or file name, like z Download, it will access to cd &lt;code&gt;C:\Users\User\Downloads&lt;/code&gt;. It will recognize the path already. &lt;/p&gt;
&lt;h2&gt;
  
  
  PSFzf(Fuzzy finder)
&lt;/h2&gt;

&lt;p&gt;This is a tool like an interactive search bar on your terminal command line that allows regex matching, and filtering files, or directories. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;iNSTALL SCOOP (if you have scoop installed skip this part)&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;irm get.scoop.sh | iex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Install fzf an pszf&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;scoop install fzf #install fzf
Install-Module -Name PSFzf -Scope CurrentUser -Force #powershell 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgu1q3oxa8rnsuo01e5e8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgu1q3oxa8rnsuo01e5e8.png" alt=" " width="800" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Import module into the profile&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Import-Module PSFzf
# Override PSReadLine's history search
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+f' -PSReadlineChordReverseHistory 'Ctrl+r'

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Below is how to use fzf to search your file or history command:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Ctrl+r(Fzf Reverse Fuzzy Search)&lt;/code&gt;：to fuzzily search your command searches your history, &lt;strong&gt;similar to the history command&lt;/strong&gt;, and run select or use it&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Alt+c (Fzf Set Location)&lt;/code&gt;: fuzzily search for a directory in your home directory and allow to cd to the directory. Basely this is &lt;strong&gt;quickly selected to subdirectory&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CTRL-f (Fzf Provider Select)&lt;/code&gt;: to fuzzily &lt;strong&gt;search for a file or directory in your home directory&lt;/strong&gt; and select it will get the path of it&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: In psreadline if you use the &lt;code&gt;Set-PSReadLineOption -EditMode Emacs&lt;/code&gt; then probably &lt;code&gt;alt+c&lt;/code&gt; you will not be able to use, due to the hotkey is been conflict, which psreadline will take higher priority. in the below picture you can see &lt;code&gt;alt+c&lt;/code&gt; is a conflict, so if you use alt+c it will be a capitalized word in this case. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxt91i5l8i5sutzrx7k4a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxt91i5l8i5sutzrx7k4a.png" alt=" " width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If I try to change the conflict function capitalize word using this &lt;code&gt;Set-PSReadLineKeyHandler -Chord 'Alt+Shift+C' -Function CapitalizeWord&lt;/code&gt; it still won't change, probably it's been hotcode. &lt;br&gt;
So there are two solutions to fix it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Method1: don't use &lt;code&gt;emac&lt;/code&gt;, change to &lt;code&gt;window&lt;/code&gt; or &lt;code&gt;vi&lt;/code&gt; mode&lt;/li&gt;
&lt;li&gt;method2: use the alternative command as a function to use it
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function FzfNav { Get-ChildItem . -Recurse -Attributes Directory | Invoke-Fzf | Set-Location }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  layout fzf
&lt;/h3&gt;

&lt;p&gt;Layout allows you to adjust the percentage of the navigator bar, and adjust the total result position, like below. You can add it to the function when next time you want to use just call a function instead of typing a complicated command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$(fzf --height 40% --reverse)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8o22tko6whumtut5x923.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8o22tko6whumtut5x923.png" alt=" " width="385" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  preview files in fzf
&lt;/h3&gt;

&lt;p&gt;This allows you to preview or read the file without opening the file to see whether this is the file you want. You can also add text editor in front when you enter the file allowing you to modify it. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;install&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;scoop install bat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;preview file&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fzf --preview='cat {}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Preview and enter the file to modify on a specific text editor&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function ff{
vim $(fzf --preview 'bat --style=numbers --color=always --line-range :500 {}')
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3th9r7d39fnnwgzwz1mz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3th9r7d39fnnwgzwz1mz.png" alt=" " width="404" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  search syntax
&lt;/h3&gt;

&lt;p&gt;You can use this related syntax to search your file&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;'wild&lt;/code&gt;: include wild&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;!^music&lt;/code&gt;: do not start with music&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;!.mp3$&lt;/code&gt;: do not end with .mp3&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;!test&lt;/code&gt;: do not include test&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;^music&lt;/code&gt;: start with music
&lt;code&gt;.mp3$&lt;/code&gt; : end with .mp3&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FastFetch
&lt;/h2&gt;

&lt;p&gt;Fastfetch is an alternative to neofetch tool that will show your system information. You can find more information on think &lt;a href="https://github.com/fastfetch-cli/fastfetch" rel="noopener noreferrer"&gt;fastfetch link&lt;/a&gt;. This &lt;a href="https://github.com/beucismis/awesome-fetch" rel="noopener noreferrer"&gt;awesome-fetch&lt;/a&gt; provides many alternative related tools.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#generate config:
fastfetch --gen-config
#location window: C:\Users\test\.config\fastfetch\config.jsonc
#load customer cfg: 
fastfetch --load-config /path/to/config_file
fastfetch --load-config .\aa.jsonc

#SHOW ONLY HARDWARE: 
fastfetch -c hardware

#PRINT LOGOS: 
fastfetch --print-logos

#USE LOGO: 
fastfetch --logo sparky

#print all logo: 
fastfetch --print-logos

#USE CERTAIN COLOR : 
fastfetch --color blue
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;YOu can find many more preset examples &lt;a href="https://github.com/fastfetch-cli/fastfetch/tree/dev/presets/examples" rel="noopener noreferrer"&gt;here &lt;/a&gt;to see more settings.&lt;/p&gt;

&lt;h1&gt;
  
  
  window terminal some setting
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. Automatic copy string when select it
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Method1: adding into the window terminal&lt;br&gt;
Open terminal setting shortcut: &lt;code&gt;ctrl+shift+p&lt;/code&gt;, or &lt;code&gt;ctrl+shift+,&lt;/code&gt; to open &lt;code&gt;settings.json file&lt;/code&gt;&lt;br&gt;
Select will copy: &lt;code&gt;copyonselect=true&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Method2: add into profile&lt;br&gt;
You can also automatically add to the profile:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function cpy { Set-Clipboard $args[0] }
function pst { Get-Clipboard }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Paste multiply line pop warming
&lt;/h2&gt;

&lt;p&gt;If you copy multiple lines and paste them into the window terminal will pop warming, to disable the warming we can set &lt;code&gt;Multipastingwarming=false&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is what I mean about copy and pasting multiple line warming:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj1v3n91i340kp2y6msfy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj1v3n91i340kp2y6msfy.png" alt=" " width="490" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Clear-Hidden showing the terminal logo
&lt;/h2&gt;

&lt;p&gt;Powershell core release new version 7.4.2 will pop, you can hide this message or logo, just add &lt;code&gt;-nologo&lt;/code&gt; into the window terminal like below &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxq1d3wlnkk0yq23vuh43.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxq1d3wlnkk0yq23vuh43.png" alt=" " width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  conclusion
&lt;/h1&gt;

&lt;p&gt;In this post I just wish to keep it simple on how to set up oh-my-posh, however, there are many more to cover. I have another post of &lt;a href="https://medium.com/jacklee26/setup-fancy-terminal-using-ohmyposh-9f0ce00948bf" rel="noopener noreferrer"&gt;Medium &lt;/a&gt;which cover a lot of detail. I wish to make it short in this post, there are many of the psreadline I didn't make more detail on each function. &lt;/p&gt;

</description>
      <category>terminal</category>
      <category>window</category>
      <category>powershell</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
