Showing posts with label MacOS. Show all posts
Showing posts with label MacOS. Show all posts

Wednesday, November 26, 2025

Termius or macOS Terminal keyboard shortcuts

 Termius on Mac uses standard macOS shortcuts along with some specific commands for its unique features like the Command Palette and split view. 

General Actions
Action Shortcut
Command Palette (access tabs/hosts)Command-K
Jump between tabsCommand-J
New connection/tabCommand-T
Open local terminalCommand-L
Open side panel (snippets/history)Command-S
Split window into two panesCommand-D
Close split paneShift-Command-D
Close tabCommand-W
Terminal Navigation & Text Editing (Standard Unix/Mac)
These shortcuts are standard for most command-line interfaces on macOS and work in Termius: 
  • Go to beginning of lineControl-A
  • Go to end of lineControl-E
  • Delete from cursor to beginning of lineControl-U
  • Delete from cursor to end of lineControl-K
  • Navigate by wordOption-Left Arrow or Option-Right Arrow
  • Reverse search command historyControl-R
  • Autocomplete directory/file nameTab (type characters, then press Tab once or twice)
  • Send break (equivalent to Ctrl-C in shell)Command-. (period) 
Copy/Paste 
  • CopyCommand-C
  • PasteCommand-V
  • Paste selectionShift-Command-V 

Monday, November 10, 2025

Using SFTP on macOS



Method 1 SFTP (Secure File Transfer Protocol) is a secure way to transfer files between systems. macOS provides built-in support for SFTP through the terminal, and you can also use third-party tools for a graphical interface.


Method 1: Using Terminal (Built-in SFTP Client)


Open Terminal Launch the Terminal app from Applications > Utilities or by searching for it in Spotlight.


Connect to the Server Use the following command to initiate an SFTP session: sftp username@hostname Replace username with your server username and hostname with the server's IP address or domain.


Authenticate Enter your password when prompted.


Transfer Files Use these commands to manage files: Upload a file: put /path/to/local/file /path/to/remote/destination Download a file: get /path/to/remote/file /path/to/local/destination List files: ls Exit SFTP session: exit


Method 2: Using FileZilla (Graphical Interface)

Download and Install FileZilla Download FileZilla Client for macOS from FileZilla's official site. Ensure you select the version compatible with your macOS version.


Launch FileZilla Open the application after installation.


Set Up Connection Enter the following details in the top bar: Host: sftp://hostname Username: Your server username. Password: Your server password. Port: Default is 22.


Transfer Files Drag and drop files between the local and remote panes to upload or download files.


Best Practices


Always use strong passwords or SSH keys for authentication.


Verify server authenticity to avoid man-in-the-middle attacks.


Use third-party tools like FileZilla for ease of use if you're not comfortable with command-line operations.

Friday, October 10, 2025

How to show hidden folders in Mac OS in Finder

 To show hidden files and folders on a Mac, open Finder and press the Command (⌘) + Shift + Period (.) keys simultaneouslyThe hidden files will appear with a faded or semi-transparent look. To hide them again, press the same keyboard shortcut. 

Using the Keyboard Shortcut
  1. Open any Finder window. 
  2. Navigate to the folder where you want to view hidden files, such as your Macintosh HD folder. 
  3. Press and hold the Command, Shift, and Period keys all at the same time. 
  4. Hidden files and folders will appear. 
  5. To hide them again, repeat the same key combination. 
Using Terminal (Alternative Method)
  1. Open Terminal by searching for it in Spotlight (magnifying glass icon). 
  2. Enter the following command and press Return: defaults write com.apple.finder AppleShowAllFiles YES. 
  3. Hold down the Option key, right-click the Finder icon in the Dock, and select Relaunch to apply the changes. 
  4. To hide all files again, you can use the same command, replacing YES with NO, or simply press the keyboard shortcut from the first method. 
Why Files Are Hidden
Hidden files are usually system files and should not be deleted or changed as it could cause problems with macOS or specific applications. They are hidden by default to prevent accidental modification or deletion. 

Monday, August 4, 2025

"Passwords" button stuck in the desktop in mac OS

There is an annoying "passwords" button stuck on the Mac OS desktop. Check this link out for a detailed description & probable workarounds. Pressing cmd+ left click helped me get rid of it in my case.

 https://discussions.apple.com/thread/252109550?answerId=254260694022&sortBy=rank#254260694022


Sunday, April 20, 2025

Run windows apps through Wine emulator on Mac OS Apple Silicon

 https://macappstore.org/whiskey/ 

About the App

Install the App

  1. Press Command+Space and type Terminal and press enter/return key.
  2. Copy and paste the following command in Terminal app:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 
    and press enter/return key. Wait for the command to finish. If you are prompted to enter a password, please type your Mac user's login password and press ENTER. Mind you, as you type your password, it won't be visible on your Terminal (for security reasons), but rest assured it will work.
  3. Now, copy/paste and run this command to make brew command available inside the Terminal: echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
  4. Copy and paste the following command:
    brew install --cask whiskey

Done! You can now use Whiskey.

Refer this video on the steps to use the app on Mac OS Apple Silicon laptops

https://www.youtube.com/watch?v=8KeES5llh9I&t=82s 


Wednesday, January 10, 2024

Prevent a Macbook from sleeping when the lid is closed when power is not connected

The external monitor gets turned off by default when the Macbook monitor lid is closed. Here is how you can override this behavior.  

Open terminal & execute the 

sudo pmset -a disablesleep 1

You can reverse this setting by running the below command in the terminal

sudo pmset -a disablesleep 0

The other regular way for the external monitor to remain ON is as below:


Connect to power.
Connect to external monitor.
Close lid.



Friday, June 25, 2021

[MacOS BigSur 11.4] Issue with Pulse Secure client on Apple Silicon based macbook M1 laptop


 If you happen to buy or get your hands on the Apple Macbook Pro M1 or Macbook Air M1 based on the Apple M1 silicon chip there are a few things that might be helpful if you need to connect to your corporate VPN network using Pulse Secure application.

In my case, I did have my initial doubts if the pulse secure app will work successfully or not. My doubt turned out to be true and it did not work correctly out of the box.

If you download the Intel-based Pulse Secure version 9.1.9  application from Pulse secure website or from your company website, the application will not be able to successfully connect to your corporate network.

It will time out with a network error!! Googled out a bit & to my luck found this community post from Pulse Secure community website https://community.pulsesecure.net/t5/Pulse-Connect-Secure/PSAL-failed-to-Launch-Java-Applet-MacOS-Catalina-10-15-4/m-p/45177/highlight/true#M28690 

It turned out that you will need to install Oracle Java 25 from here https://javadl.oracle.com/webapps/download/AutoDL?BundleId=244576_d7fc238d0cbf4b0dac67be84580cfb4b and then restart Pulse Secure 9.1.9 and continue to connect to your corporate network connection URL & this time it should connect successfully once the SSO login with your corporate credentials works successfully. 



Monday, July 20, 2020

Installing pip with get-pip.py in a Python virtual environment on Windows MacOS & Linux

  • To create a Python virtual environment type below commands on the required console prompt:

On Windows
    python -m venv ./venv
    .\venv\Scripts\activate
On Ubuntu
    python3 -m venv ./venv
     source ./venv/bin/activate    
There are some exceptional cases where vent creation might fail. Here are some workarounds -
https://askubuntu.com/questions/1268833/error-command-path-to-env-bin-python3-7-im-ensurepip-upgrade
123

To exit a Python virtual environment, you can use the deactivate command. This command is available in most Unix-like systems and Windows.

Example

$ deactivate

Steps to Exit Virtual Environment

1. Using deactivate Command

The most common way to exit a virtual environment is by using the deactivate command1.

Example:

$ deactivate

2. Using source deactivate

In some cases, especially with certain virtual environment management tools like virtualenvwrapper, you might need to use the source deactivate command2.

Example:

source deactivate

  • To install pip, securely download get-pip.py by following this link: get-pip.py. Alternatively, use curl:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Then run the following command in the folder where you have downloaded get-pip.py:

python get-pip.py

Warning

 

Be cautious if you are using a Python install that is managed by your operating system or another p

ackage manager. get-pip.py does not coordinate with those tools, and may leave your system in an inconsistent state. Hence it is recommended to use venv (Python Virtual Environment) to isolate the working environment with the Python environment at the system level.
Found this article to be a gem to troubleshoot pip errors on Windows -- https://jhooq.com/pip-install-connection-error/

To install python3 & virtualenv on MacOS

Python3 Virtualenv Setup

Requirements:

  • Python3
  • Pip3
$ brew install python3 #upgrade

Pip3 is installed with Python3

Installation

To install virtualenv via pip run:

$ pip3 install virtualenv

Usage

Creation of virtualenv:

$ virtualenv -p python3 <desired-path>

Activate the virtualenv:

$ source <desired-path>/bin/activate

Deactivate the virtualenv:

$ deactivate

You can see more about the Homebrew on the official page.


Featured

TechBytes on Linux

This is a growing list of Linux commands which might come handy for the of Linux users. 1. Found out i had to set the date like this: ...

Popular Posts