How To Run / Execute Command Using SSH

To run a command using SSH on a remote server, follow these steps: Open a terminal or command prompt on your local machine. Type the following command: ssh username@remote_host command Replace username with your username on the remote server, remote_host with the hostname or IP address of the remote server, and command with the command … Read more

UNIX Samba: Make A Share Writable

To make a Samba share writable on a UNIX system, follow these steps: Open the Samba configuration file for editing. The location of this file may vary depending on your system, but it is usually located at /etc/samba/smb.conf. Locate the section of the file that defines the share you want to make writable. This section … Read more

UNIX Create User Account

To create a new user account on a UNIX system, follow these steps: Log in to the system with administrative privileges. Open a terminal or command prompt. Type the following command and press Enter: sudo adduser username Replace username with the desired username for the new user account. The system will prompt you to set … Read more

Linux: Iptables Forward Multiple Ports

To forward multiple ports using iptables in Linux, you can use the multiport module to specify a range of ports or a comma-separated list of ports. Here’s an example of how to forward multiple ports: Open the iptables configuration file for editing: sudo nano /etc/sysconfig/iptables Add a rule to forward multiple ports. For example, to … Read more

HowTo: Linux Serial Port Sniffer

A serial port sniffer is a tool that allows you to monitor and log the traffic between two serial devices. In Linux, you can use the socat utility as a serial port sniffer. Here are the steps to use socat as a serial port sniffer: Install socat if it’s not already installed: sudo apt-get install … Read more

MySQL: Log Files in Linux / UNIX / BSD

In MySQL, log files are used to record various events that occur within the server. These logs can be useful for troubleshooting issues or auditing activity. Here are the log files in Linux/UNIX/BSD systems where MySQL logs are typically stored: Error Log: The error log records any errors that occur in the MySQL server. This … Read more

MySQL: Set Cache Size

In MySQL, you can set the cache size for different types of caches to improve performance. Here are the steps to set the cache size: Open the MySQL configuration file my.cnf in a text editor. sudo nano /etc/my.cnf Find the section for the cache you want to set the size for. For example, the key_buffer_size … Read more

UNIX: Zip Example

The zip command is a commonly used utility for compressing files and directories on Unix-like systems. Here are some examples of how to use the zip command: Compress a file: zip archive.zip file.txt Compress multiple files: zip archive.zip file1.txt file2.txt Compress a directory and its contents: zip -r archive.zip directory/ Compress a directory and exclude … Read more