How to Add a Virtual Swap Partition in Linux
Create a 2GB file:
mkdir /www/swap
dd if=/dev/zero of=/www/swap/swap bs=1024 count=2048000
2048000+0 records in
2048000+0 records out
2097152000 bytes (2.1 GB) copied, 6.70164 s, 313 MB/s …
Create a 2GB file:
mkdir /www/swap
dd if=/dev/zero of=/www/swap/swap bs=1024 count=2048000
2048000+0 records in
2048000+0 records out
2097152000 bytes (2.1 GB) copied, 6.70164 s, 313 MB/s …
Sometimes when you need to transfer files from a local Windows host to a remote Linux server without using an FTP tool, you can use this utility for file transfers.
Installation:
yum -y install lrzsz
Drag and drop files into the SSH tool window:
View uploaded files:
…
nmap is a very handy free port testing and scanning tool that can test port connectivity. Below is a simple port test using this tool.
CentOS system: yum -y install nmap
Ubuntu system: apt -y install nmap
Test command: 8585 is the port to test.
nmap 192. …
Recently, while tinkering with cloud server firewall settings, I accidentally misconfigured it and lost SSH connectivity. The error message is as follows:
ssh_exchange_identification: read: Connection reset by peer
Add the -v parameter to view detailed connection info:
ssh -v 192.168.0.101
Solution: Use VNC or similar …
Today, when logging into a remote Windows host, I encountered the following error:
To log on to this remote computer, you must be granted the Allow log on through Terminal Services right. By default, members of the "Remote Desktop Users" group have this right. If you are not a member of the "Remote Desktop Users" group or other groups that have this right …
RDesktop Error: Remote Desktop Does Not Support Colour Depth 24; Falling Back to 16 Fix
Solution: Add the -a parameter for better display quality.
Example:
rdesktop 192.168.1.xxx -u administrator -p password
Change to: …
RDesktop is an excellent tool for remotely connecting to Windows from Linux.
For installation, refer to: Using rdesktop to remotely access a Windows host from Linux
Basic command:
rdesktop 192.168.1.xxx
Connection with username and password:
rdesktop 192.168.1.xxx -u administrat …
Check current disk usage: df -h
fdisk -l #View all disk statuses
By comparison, we can see there is a 500G /dev/vdb that is not mounted.
Partition and format: fdisk -S 56 /dev/vdb. Input respectively: "n" , "p" , "1" ,"Enter","Enter" , "wq"。
f …
Installation (using version 1.8 as an example):
yum -y install wget vim tree gcc gcc-c++ autoconf libX11-devel openssl-devel
wget https://github.com/rdesktop/rdesktop/releases/download/v1.8.3/rdesktop-1.8.3.tar.gz
tar z …
Installing the Graphical Interface (using CentOS with Xfce desktop as an example), here:
bash <(curl -s https://gitee.com/cnop/shell/raw/master/Xfce.sh)
VNC Download
Install the software:
yum install -y epel-release
yum -y install putty
Launch the software:
p …