If you are starting out in any branch of computer science, whether software development, data science, software, and data engineering, should at the least become familiar with basic Linux commands.
Here I am listing a few of them:
Short for ‘manual’: it provides the details about any command in Linux, for example, to know about ‘cp’ command in Linux:
$ man ls
Short for ‘present working directory’, gives the directory the user is in currently
Stands for ‘change directory’, to change the current directory to another
To print anything to the terminal
Gives the name of the current user
This allows making admin-level changes, which the current user might not have permission to do.
List all files in the current directory.
Create a new file in the current directory
- nano or vi
Opens any text file in edit mode.
Copies a file from one directory to another
Moves a file from one directory to another
Removes a file from the current directory
Creates a new directory
Removes an existing empty directory
Shows the contents of a text file
Looks for a text in a text file
- ls -l
Lists all the files and folders along with the permissions of the Users, Groups, and Others
Users : The user who creates the files.
Groups: The group the users belong to.
Other: Any other user who is not the user and not in the group
The first part above specifies the permissions of the file/folder.
‘d’ denotes a directory. For files, this will be shown as ‘-’.
The first three letters after ‘d’ denote the User level permissions, where
‘r’ denotes the read permissions
‘w’ denotes the write permission
‘x’ denotes execute permissions
The next three letters denote Group level permissions
and the last three letters before @ denote other’s permissions
Stands for ‘change owner’. Changes the owner of a file as shown below
Changes the read-write-execute permissions of a file. For example, ‘chmod 777’ changes the permissions of the file to give read-write-execute access to all the users.
The details for the numbers is given below:
There are many more, but these should be enough to get anyone started with Linux.