Tutorial. Use of Linux in your computer - mtuoc/tutorials GitHub Wiki
1. Introduction
To #carry operations with big textual corpus is indispensable to use a Terminal of Linux/Unix. The Unix operating system allows large text files to be processed very efficiently. Furthermore, if you work in server environments to train machine translation engines, you will need to master the use of the Unix terminal.
Depending on your operating system, you will have different options.
- If you work on a computer with Linux, you won't have to do anything, as it will already have the terminal. You will just need to locate the Terminal application.
- If you work on a Mac computer, you won't have to do anything either, as it has a native Unix terminal. All you have to do is find the Terminal application.
- However, if you work with Windows, you will NOT have a Linux/Unix terminal by default. IMPORTANT: Windows has CMD or Command Prompt and PowerShell, which are NOT Linux/Unix terminals and will not be useful for corpus processing and engine training. However, starting with Windows 10, it is possible to install a fully functional Linux/Unix terminal: WSL: Windows Subsystem for Linux. In the following sections, we explain how to install this terminal.
2. Installation of WSL (Windows Subsystem for Linux)
In Windows 10 and 11, you can install the Linux subsystem, which will provide you with a fully functional Linux terminal. There are two ways to install this application: from the Microsoft Store and manually. Please note: if the installation is successful, you will be asked for a username and password, which you will need to remember in order to log in in the future.
2.1. Installation of WSL from the Microsoft Store
You can refer to the following tutorial: How to install WSL from the Microsoft Store on Windows 10 and 11
2.2. Manual installation of WSL
You can follow the tutorial below:
Installation of Linux in Windows with WSL
2.3. Troubleshooting
Although installing WSL, whether from the Microsoft Store or manually, is straightforward, errors may occur. If an error appears, it is very important to note down the error code and search Google for the solution. Most errors are also covered in the following tutorial:
Troubleshoot Windows Subsystem for Linux issues
2.4. First steps with WSL
Once the system is installed, we will have a Linux system with its own Linux directory system. However, it will also be possible to access Windows system drives, as they are automatically mounted each time we start the Linux subsystem. If we want to access the C drive in Windows, we can do the following:
cd /mnt/c
If we use a Windows drive while working with the Linux subsystem, we can perform the usual file operations from both Linux and Windows. For example, if we want to create a directory and cannot remember the Linux command, we can open Windows File Explorer and create the subdirectory using this application. We can also edit the files with our favourite Windows editor.