Command | Command Full name | Example | Work |
ls | list | ls | lists all folder and file inside of a directory and prints them |
cd | change directory | cd users | changes directory into another directory. |
mkdir | make directory | mkdir newfolder | creates a new directory. |
pwd | present working directory | pwd | prints the current directory path. |
touch | touch | touch newfile | creates a file. |
vi | visual editor | vi newfile | creates a file and edit immediately. |
nano | nano | nano filename | opens the file in an editor. |
cat | cat | cat filename | prints the contents of the file in the shell. |
rm | remove | rm -r filename | Removes a file or folder |
free |
free -g
| free | free
| prints how much memory is being used and available. |
| nproc
| number of processors | nproc
| prints number of processing units available. |
| df
| disk usage in file system | df -h
| prints how much disk space is being used in file system. |
| top
| top | top
| prints a real-time view of the running processes and displays kernel managed tasks. |
| man
| manual | man ls
| prints details of a command |
| history
| history | history
| prints all the commands the user used |
Shebang
Shebang is the first line of a shell script which indicates which interpreter will be used to run the script.
Usually, it starts with #!
and the line of code is something like this:
#!/bin/user/bash
chmod
chmod
(Change mode bits) is a special command to change the mode of access of a directory or a file.
It has 3 parts in it which are defined by number.
What is the permission for my user?
What is the permission for my user group?
What is the permission for the other users?
๐๐ผ 7 is the highest permission number for any access. Linux uses 4 for read, 2 for write and 1 for execute.