Linux is a very powerful platform which can be used to do almost everything in computer world. It is an open-source and free operating system. There are various distributions of Linux operating system including Ubuntu, Fedora, Debian, Mint, Opensuse etc. Even the Android operating system which has revolutionised the phone industry is a distribution of Linux operating system. About 90 % of world’s fastest computer’s uses Linux OS. Linux is very light and it even makes the weak processors do more faster things than using the Windows operating system.
Here, we will start with the basics of the navigational commands and then gradually move towards scientific programming in bash.
- Introduction to Linux OS, simple navigational commands, pwd (print working directory), ls (list directory), rm (remove), rmdir (remove directory), mkdir (make directory)
2. cp (copy files), mv (move or rename files), file structure in linux, root directory
3. Manipulate the directory stack: pushd (saves the current working directory in memory so it can be returned to at any time) , popd (returns to the path at the top of the directory stack)
Size of the directory: du
Check disk space: df
4. find (finding files on system), finding and removing, finding and executing some operation on it.
5. cat (for displaying text file on screen, reading text file), more (Displays text, one screen at a time), less (program similar to more, but has many more features), head (display first few lines of the file), tail (display last few lines of the file)
6. Managing and editing .bashrc, .bash_profile (These files run everytime, you refresh or start a terminal). alias, functions in linux
7. for loop in Linux
8. while loop, if-elif-else loop in linux
9. Defining arrays in linux, using echo commands
10. Using bash/linux to read a file, defining each columns of a file to different variables, Internal Field Separater, IFS
- Utpal Kumar (IES, Academia Sinica)