Showing posts with label Command. Show all posts
Showing posts with label Command. Show all posts

Activate Window

PowerShell is a powerful scripting language and command-line shell developed by Microsoft. One of its most fascinating capabilities is its ability to execute commands and scripts from remote URLs. A frequently used shorthand for downloading and executing a script in PowerShell is:

 $    irm https://get.activated.win | iex

Understanding the Command

  1. irm
    irm is short for Invoke-RestMethod, a cmdlet in PowerShell used to send HTTP or HTTPS requests to a web server and process the response. In this context, it fetches the script or data hosted at the provided URL (https://get.activated.win).

  2. https://get.activated.win
    This URL points to the location of the script or resource to be downloaded. When you run the command, PowerShell fetches the content hosted here.

  3. | iex
    The | symbol is a pipeline operator in PowerShell. It takes the output from the irm command and passes it to iex.
    iex stands for Invoke-Expression, which evaluates or runs the code it receives as input.

    In this case, the script fetched from https://get.activated.win is executed immediately by PowerShell.


Purpose of the Command

This command is commonly used for:

  • Bootstrap Installers: Installing tools or software by fetching and executing an installer script directly from a URL.
  • Custom Scripts: Running automation scripts hosted online.
  • Quick Deployments: Setting up configurations or environments on remote machines with minimal input.

Security Implications

While the command is extremely convenient, it also comes with significant security risks. Downloading and executing code directly from the internet without verifying its contents can lead to:

  • Malware Infections: Malicious actors may host harmful scripts under seemingly legitimate URLs.
  • Unauthorized Access: Scripts could install backdoors or steal sensitive information.
  • System Compromise: A poorly written script might unintentionally break critical system components.

How to Use the Command Safely

  1. Verify the Source
    Ensure that the URL (https://get.activated.win in this case) is legitimate and comes from a trusted source.

  2. Inspect the Script
    Instead of executing the command directly, download the script first and inspect its contents. You can do this by running:

    irm https://get.activated.win > script.ps1
    notepad script.ps1
  3. Run with Limited Permissions
    Execute scripts in a controlled environment, such as a virtual machine or a sandbox, to mitigate risks.

  4. Avoid as a Habit
    Use this approach sparingly. Prefer fetching scripts, inspecting them, and executing only those you trust.


Conclusion

The $irm https://get.activated.win | iex command showcases the power of PowerShell to interact with web resources seamlessly. However, this convenience demands responsibility. Always be cautious about where your scripts come from and what they do. By following best practices, you can leverage this command safely and efficiently.

Do you often use this command or similar ones? Share your experiences or tips in the comments below!

FTP Error!

FTP Error!

 Status: Connecting to 192.168.XX.XX:XX... Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server". Error: Could not connect to server Status: Waiting to retry... Status: Connecting to 192.168.XX.XX:XX... Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server". Error: Could not connect to server

If this problem is faced then just type command

$    sudo ufw allow 21


Text-based User Interface (TUI) commands in Linu

Text-based User Interface (TUI) commands in Linux allow for a graphical-like interface within the terminal, enabling users to interact more visually without needing a full GUI environment. Here are some popular TUI commands and tools in Linux:


System Monitoring and Management

1. htop - An enhanced version of top, showing CPU, memory, and process usage with interactive controls.

        $ htop

2. glances - A comprehensive system monitoring tool that displays CPU, memory, network, and disk usage.

        $ glances

3. nmon - A performance monitor that shows CPU, memory, disk, network, and more.

        $ nmon

File Management

1. mc (Midnight Commander) - A powerful file manager that allows navigation, copying, moving, and editing files.

        $ mc

2. ranger - A file manager with VI keybindings and previews of images and text files.

        $ ranger

3. vifm - A file manager with VI-like keybindings for navigating and managing files.

        $ vifm

Text Editors

1. vim - A highly configurable text editor with TUI, known for its power in text editing.

        $ vim filename

2. nano - A simple and user-friendly text editor for editing text files.

        $ nano filename

3. emacs -nw - Emacs in "no-window" mode runs a powerful editor within the terminal.

        $ emacs -nw filename

Disk and Filesystem Utilities

1. ncdu - Disk usage analyzer, providing a tree-view of disk space usage.

        $ ncdu

2. cfdisk - A partition manager that allows creating and managing partitions.

        $ sudo cfdisk

3. fdisk - A TUI for managing disk partitions.

        $ sudo fdisk /dev/sdX

Network Monitoring and Management

1. nmtui - A TUI for managing network connections.

        $ nmtui

2. bmon - A network bandwidth monitor for real-time bandwidth usage visualization.

        $ bmon

3. nload - Displays incoming and outgoing network traffic in real time.

        $ nload

System Utilities

1. alsamixer - A sound mixer for configuring audio levels.

        $ alsamixer

2. iwconfig - Configures wireless network interfaces.

        $ iwconfig

3. iftop - Displays real-time bandwidth usage per IP.

        $ sudo iftop

Package Management

1. aptitude - A package manager with a TUI interface for browsing and managing packages (Debian/Ubuntu).

        $ sudo aptitude

System Configuration

1. tldr - Simplified man pages in a readable format.

        $ tldr command

2. whiptail - A dialog box for creating prompts and menus within scripts.

        $ whiptail --title "Example" --msgbox "Hello!" 10 30

Each of these commands offers a powerful way to manage various aspects of your system from the terminal with an intuitive, interactive interface. You can install these packages through your system’s package manager if they’re not already installed.


Microsoft Core fonts on linux

 Hello Everyone!

When ever you use linux and need to run some windows software then basically i may ask for microsoft core fonts. You can use it on your Linux with couple of lines of codes. These codes installs the microsoft fonts install in your computer so that you can use your software and your document without any format change.


Use these codes:

sudo apt update
sudo apt install ttf-mscorefonts-installer

To use these code you can select one by one or you can just select all and paste it in terminal.

Linux Hardware Command

Linux Hardware Command

Command Name

Command

Function

uname

$ uname -a

The uname command displays basic information about your system, includeing the operating system name, kernel version, and processor architecture.


lsblk

$ lsblk


The lsblk command lists all the available block devices on your system, including hard drives, SSDs, and USB drives. This will display a list of all the available block devices on your system.


lspci

$ lspci


The lspci command displays information about all the PCI buses and devices connected to your system. This command can be helpful if you need to determine which devices are installed on your system.


lsusb

$ lsusb


The lsusb command displays information about all the USB buses and devices connected to your system. This command can be helpful if you need to determine which USB devices are installed on your system.


Df

$ df -h


The df command displays information about the disk space usage on your system. This command can be helpful if you need to determine how much free space is available on your hard drive.


Free


$ free -h


The free command displays information about the system's memory usage. This command can be helpful if you need to determine how much free memory is available on your system.


Top

$ top


The top command displays information about the system's processes, including their CPU and memory usage. This command can be helpful if you need to determine which processes are using the most resources on your system.


Htop

$ htop


The htop command is similar to the top command, but it provides a more user-friendly interface with colored output and the ability to sort processes by various criteria.


Dmesg

$ dmesg


This will display the system's boot messages, including any errors or warnings that occurred during the boot process.


lsmod


$ lsmod


This will display a list of all the kernel modules currently loaded on your system.


lshw

$ sudo lshw


This will display detailed information about the hardware on your system.


Hwinfo


$ sudo hwinfo


The hwinfo command is similar to the lshw command, but it provides even more detailed information about the hardware on your system.

lsdev

$ lsdev


The lsdev command displays information about all the devices on your system, including disks, tapes, CD-ROMs, printers, and serial ports.


Ifconfig


$ ifconfig


The ifconfig command displays information about your network interfaces, including their IP addresses, netmasks, and MAC addresses. This command can be helpful if you need to troubleshoot network issues or simply to learn more about your network configuration.


Iwconfig

$ iwconfig


The iwconfig command displays information about your wireless network interfaces, including their SSIDs, signal strengths, and encryption settings. This command can be helpful if you need to troubleshoot wireless network issues or simply to learn more about your wireless network configuration. To use the iwconfig command, simply open a terminal window and type −


Uptime

$ uptime


The uptime command displays information about how long your system has been running, along with its average load. This command can be helpful if you need to determine how long your system has been running or to troubleshoot performance issues.

lsmod


$ lsmod


The lsmod command displays information about the kernel modules currently loaded on your system. This command can be helpful if you need to determine which modules are loaded or to troubleshoot issues related to kernel modules.

lspcmcia

$ lspcmcia


The lspcmcia command displays information about all the PCMCIA devices connected to your system. This command can be helpful if you need to determine which PCMCIA devices are installed on your system. To use the lspcmcia command, simply open a terminal window and type −


dmidecode

$ sudo dmidecode --type 17


This will display a list of all the PCMCIA devices connected to your system.