Vim is the most popular Linux text editor, it was created in 1978 and is used to present days.
Vim has two modes: “Command mode” where you can insert many commands, and “Insert mode” – where you can insert and edit text document. By default Vim open all documents in “Command mode”, to enter into the “Insert mode” – press button “i“.
The most asked question is – “How to exit Vim?” – it is very simple – in Command mode enter :q! and press Enter. This command exit Vim without saving any changes.
:q!
To save file – enter command :w <filename> and press Enter:
:w file.txt
To save file and exit Vim use command :wq and press Enter
To install GPG on your Debian/Ubuntu/Mint Linux operating system use command:
sudo apt-get install gpg
Default GPG folder is: /home/user/.gnupg. Generate private and public keys:
gpg --full-gen-key
Answer the several questions (encryption type: RSA, keysize: 4096 for better encryption, key expiration time, your name and email address) and press “O” if all changes are correct.
To run Windows programs in Linux we use Wine. But how to open any file with exe program using Wine? For example we have 1.txt file. To run this file with notepad.exe use command:
wine "/home/user/notepad.exe" 1.txt
To associate some type of files with EXE program we can use shell script:
The official WineHQ repository has a set of standard Wine packages that you can download and install on your system. Please follow these steps to do so:
Run the following command in the Terminal for adding i386 architecture before installing a 64-bit version of Wine:
This command will get all SNMP information from router 192.168.1.1 and save it into file out.txt
Now let’s create file index.php and write code that will get all MAC addresses from BDCOM P3310 OLT. To get all MAC addresses use OID: iso.3.6.1.2.1.17.7.1.2.2.1.1. In PHP file create function SnmpGet:
2. Create Live USB of Arch Linux using Etcher GUI tool:
Etcher GUI tool on Linux
Or You can use Rufus in Windows:
Once you have created a liveUSB for Arch Linux, restart your PC and boot from USB. While booting press Delete, F2, F10 or F12 key to go into boot menu.
3. Create partition.
Use the command fdisk to show and create partitions on your system:
fdisk -l
If you have old partitions on your disk, you can delete them all using command:
wipefs -a /dev/sda
Be careful! This command destroy all data on your hard drive.
Select the disk you are going to partition:
fdisk /dev/sda
Enter n – to create new partition, then program ask you to choose a disk number, enter 1, and then enter first and last block of dist (press Enter for default).
4. Create root partition. To format root partition use command:
mkfs.ext4 /dev/sda1
5. Install Arch Linux
mount /dev/sda1 /mnt
Use pacstrap script to install all necessary packages:
pacstrap /mnt base linux linux-firmware vim nano mc
Generate a fstab file to define how disk partition, block devices or remote file systems are mounted into the filesystem.
genfstab -U /mnt >> /mnt/etc/fstab
Use arch-chroot and set the mounted disk as root. Now Arch Linux is installed on the disk.