It is an undeniable fact that linux powers the biggest portion of the world’s computing infrastructure; and there is enough statistical data to back this up. This is attributed to linux’s reputation of being stable and secure. In this era where data is the new gold mine, a lot of this data flows through these systems that are powered by linux operating system. It is therefore paramount for any data engineer to have a good grasp of linux OS, its concepts and its most basic commands to ensure they are productive while working with these systems. These basic commands include but not limited to:
ls - List files and folders in a directory
cd – Change directry
pwd – Show the current working directory
man – Used to look up any command in the manual
mv – Used to move or rename files
cp – Used to make a copy of a file.
chmod – Used to change the file permissions
chown – Used to change the ownership of a file
It is important to be aware of the flags/options that go with these commands for the purpose of allowing the commands to behave differently or to enable additional functionality.
Linux Text Editors
a. nano
nano is an easy to use text editor that is quite easy to grasp.
To open a file on nano, type nano and the filename afterwards and press enter.
Useful commands in nano are:
Ctrl + C – Show cursor position in the editor
Ctrl + X – Exit the editor
Ctrl + G – Display the help screen
Ctrl + O – Write to a file
Eg.
nano configs.txt → Opens the file configs.txt if it exists. If it doesn’t exist, nano creates it and opens it.
b. Vi
Vi provides 3 modes in which keys perform different actions depending on the mode vi is in. The modes are:
- Command mode It is the default mode. In this mode, each key is an editor command, that is, any keyboard stroke is interpreted as a command that can modify the files contents.
- Insert mode You type “i” to switch to insert mode from command mode. It is indicated by an “?INSERT?” at the bottom of the screen. Insert mode is used to enter(insert) text into a file. To exit insert mode, you press Esc key and by default go back to command mode.
- Line mode One types : to switch to the line mode from command mode. In this mode, each key is an external command. These are actions like writing the file contents to the disk or exiting. To exit insert mode, you press Esc key and by default go back to command mode.
Conclusion
Linux mastery is a must have skill for a data engineer because it is the foundational operating system for the majority of data infrastructure, cloud computing platforms, and production environments.
Text editors like vi and nano are useful utility softwares used in linux for many tasks such as creating or modifying system configuration files, writing scripts, developing source code hence the need to know how to use and navigate through them.






Top comments (0)