Showing posts with label Terminal. Show all posts
Showing posts with label Terminal. Show all posts

Aug 30, 2023

Windows Terminal : Always Run as Administrator

How to Enable Windows Terminal to always "Run as Administrator" option.

1) Open --> Windows Terminal

2) Goto --> Settings

3) Under "Profile" section, select which profile you want to enable, in this case select --> Command Prompt

4) On the right-pane, scroll down and search for --> Run this profile as Administrator = On


!!! HAPPY COMPUTING !!!

May 18, 2023

Android : Install Ubuntu via Termux

Install Ubuntu in Android Phone with Termux (No Root).

Official GitHub MFDGaming: https://github.com/MFDGaming/ubuntu-in-termux


Termux Terminal

  1. pkg upgrade -y
  2. pkg install wget -y
  3. pkg install proot -y
  4. pkg install git -y
  5. git clone https://github.com/MFDGaming/ubuntu-in-termux.git
  6. cd ubuntu-in-termux
  7. chmod +x ubuntu.sh
  8. ./ubuntu.sh
  9. ./startubuntu.sh

Once Ubuntu have started, just use it as normal such as updating the repositories

10. apt update && apt upgrade -y

After update, you can proceed to use as normal and install any packages you want.




!!! HAPPY COMPUTING !!!


Apr 17, 2023

Windows : Terminal Apps (Shortcut Keys)

 Windows Terminal Apps Shortcut Keys

Download Link : https://github.com/microsoft/terminal


General Shortcuts.

  • [CTRL] +[SHIFT] + [W] --> Close Current Pane.
  • [CTRL] + [-] --> Reduce Font Size.
  • [CTRL] + [+] --> Increase Font Size.
  • [CTRL] + [0] --> Reset Font Size to Default.


Tabs, Pane and Windows Shortcuts.

  • [CTRL] + [SHIFT] + [T] --> Open New Tab with Default Profile.
  • [CTRL] + [SHIFT] + [N] --> Open New Window.
  • [CTRL] + [SHIFT] + [1 ~ 9] --> Open New Tab with Corresponding profile Index (eg. 1 to 9).
  • [ALT] + [SHIFT] + [D] --> Duplicate a Pane.
  • [CTRL] + [SHIFT] + [D] --> Duplicate a Tab.
  • [ALT] + [SHIFT] + [-] --> Split Pane Horizontally.
  • [ALT] + [SHIFT] + [+] --> Split Pane Vertically.

!!! HAPPY COMPUTING !!!

Mar 24, 2023

Apache 2 Server : Installation in Ubuntu Server v.22.04.2

 Apache 2 Server Installation in Ubuntu Server v.22.04.2

1. Ensure Ubuntu repository is up-to-date.

sudo apt update && sudo apt upgrade -y

 

2. Install Apache 2 server.

sudo apt install apache2 -y

 

3. Double check UFW settings and configure to allow. Below is to list all "Allow" apps:-

sudo ufw app list

 This is to show UFW status.

sudo ufw status

 This command is to add "Apache2" into allow list

sudo ufw allow ‘Apache’

 

4. Create a virtual directory for Apache 2 server. Replace [Domain Name] with your actual domain name (eg. intranet.company.com)

sudo mkdir /var/www/[Domain Name]

 

5. Change the ownership of that folder.

sudo chown -R $USER:$USER /var/www/[Domain Name]

 

6. Change the mode of that folder.

sudo chmod -R 755 /var/www/[Domain Name]

 

7. Now create a temporary "index.html" file for testing of the new virtual directory.

sudo nano /var/www/[Domain Name]/index.html

 Copy the below code as an example then Save and Exit.

<html>

    <head>

        <title>WELCOME TO [DOMAIN NAME] !</title>

    </head>

    <body>

        <h1>SUCCESS ! THE [DOMAIN NAME] VIRTUAL HOST IS WORKING !</h1>

    </body>

</html>

 

8. Create a configuration for your virtual host.

sudo nano /etc/apache2/sites-available/[Domain Name].conf

 Copy the following code and then Save and Exit.

<VirtualHost *:80>

    ServerAdmin webmaster@localhost

    ServerName [Domain Name]

    ServerAlias www. [Domain Name]

    DocumentRoot /var/www/[Domain Name]

    ErrorLog ${APACHE_LOG_DIR}/error.log

    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

 

9. Enable the newly created site.

sudo a2ensite [Domain Name].conf

 

10. Disable the "Default" site.

sudo a2dissite 000-default.conf

 

11. Now test the configuration of the new site.

sudo apache2ctl configtest

 It should return --> "Syntax OK" message.


12. Restart the Apache service to take effect.

sudo systemctl restart apache2

 

13. Now open any browser and browse to the new site (eg. http://[Domain Name])


Edit: Added video for easy references.




!!! HAPPY COMPUTING !!!


Webmin : Installation in Ubuntu Server v.22.04.2

 Webmin as a Web GUI for Linux (https://webmin.com/) and have tons of functions and features, this is especially useful for Beginners IT Admin personnel.

Still it is recommended to use SSH to manage any Linux servers instead of GUI.


1. Ensure Ubuntu repository is up-to-date.

sudo apt update && sudo apt upgrade -y

 

2. Install the following pre-requisites.

sudo apt install wget curl nano net-tools gnupg1 -y

 

3. Next is to add Webmin's custom repository into Ubuntu's Apt Sources.

sudo nano /etc/apt/sources.list

 Add the following at the last line of the file and then Save and Exit.

deb http://download.webmin.com/download/repository sarge contrib

 

4. Then download and add Webmin's GPG key into sources.

sudo curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh

 Run the script to update GPG key.

sudo sh setup-repos.sh

 

5. Run apt update again.

sudo apt update && sudo apt upgrade -y

 

6. Now you are ready to install Webmin.

sudo apt install webmin -y

 

7. Once installation completed, use any internet browser and open the following link. Replacing [Your IP Address] to match your server configurations.

https://[You IP Address]:10000

 

8. If you have UFW installed, you may need to add exceptions.

sudo ufw allow 10000

 

9. Do a server restart (optional) to ensure everything is loaded automatically at start.

sudo reboot

 

10. The Username and Password is the same you use to login to the server via SSH or Console.

More information and documentation is available at (http://doxfer.webmin.com/Webmin/Main_Page).


EDIT: 10-Apr-2023, Added video.




!!! HAPPY COMPUTING !!!



Mar 15, 2023

Android : Install Termux Terminal Apps

Termux is a "Terminal Emulator" but due to its functions its been banned by Google Play Store and thus was no longer available for download.

But there is another way to do this via another store apps called "F-Droid" and can be easily done.

1) Open any web browser and type-in the following link (https://f-droid.org/en/).

2) At main page (shown below), click on the --> Download F-Droid button.



3) Your mobile or Android may display some warning messages, proceed to Allow the download.

4) Once download completed, it will try to auto-install but another warning message will be displayed. Just allow the installation or Enabled --> Allow installation from unknown source.

5) Once "F-Droid" have completed the installation, on your home screen or more apps screen the "F-Droid" icon will be shown. Now tap to Open the apps.

6) At the first start, there will nothing to display but don't be alarmed as the apps is now "Updating Repositories" and may take while to complete. Just leave as it until everything is updated.

7) Once the repositories is updated, the screen will shows you some popular apps. Tap on the "Search" icon and type-in --> Termux

8) There are many apps named "Termux" but look for the descriptions that says "Terminal....", select that apps and proceed to download and install.

9) As usual, your phone will prompt you some warning, proceed to Allow download and install as usual.

10) Once everything completed, you will now have "Termux" installed and the icon will be displayed at the Home screen or inside More Apps screen.


Edited : 18-May-2023, add video link.





!!! HAPPY COMPUTING !!!