Here Is A List of Basic Linux Commands
Here Is A List of Basic Linux Commands
1. pwd command
Use the pwd command to find out the path of the current working directory (folder) you’re
in. The command will return an absolute (full) path, which is basically a path of all the
directories that starts with a forward slash (/). An example of an absolute path is
/home/username.
2. cd command
type cd followed by the directory’s absolute path: cd
/home/username/Movies.
There are some shortcuts to help you navigate quickly:
3. ls command
enter ls /home/username/Documents to view the content of Documents.
There are variations you can use with the ls command:
4. cat command
To generate a new directory inside another directory, use this Linux basic command mkdir
Music/Newfile
use the p (parents) option to create a directory in between two existing directories. For
example, mkdir -p Music/2020/Newfile will create the new “2020” file.
7. rmdir command
If you need to delete a directory, use the rmdir command. However, rmdir only allows
you to delete empty directories.
8. rm command
The rm command is used to delete directories and the contents within them. If you only
want to delete the directory — as an alternative to rmdir — use rm -r.
9. touch command
Enter touch /home/username/Documents/Web.html to create an HTML file entitled Web
under the Documents directory.
10. locate command
You can use this command to locate a file, just like the search command in Windows. What’s
more, using the -i argument along with this command will make it case-insensitive, so you
can search for a file even if you don’t remember its exact name.
use an asterisk (*). For example, locate -i school*note command will search for any file that
contains the word “school” and “note”, whether it is uppercase or lowercase.
11. find command
As an example, find /home/ -name notes.txt command will search for a file called notes.txt
within the home directory and its subdirectories.
There is a total of sixty-four signals that you can use, but people usually only use two
signals: SIGTERM (15) — requests a program to stop running and gives it
some time to save all of its progress. If you don’t specify the signal when entering
the kill command, this signal will be used. SIGKILL (9) — forces programs to stop
immediately. Unsaved progress will be lost.
20. Using netstat -tulpn shows that Apache already uses port 80 on this machine.
Step2 Verify the Wheel Group is Enabled – etc/sudoers edit remove the # commend in
su – UserName
Check the root folder
You can grab the same info from /proc/meminfo file using the following cat
$ cat /proc/meminfo
Meminfo
# free
# free [options] # free -m
# free -k
# free -t
# free -l
# free -o
# free -s 2
# free -g