Basic Linux Commands
Basic Linux Commands
1. ls : ls is a command to list computer files in Unix and Unix-like operating systems. When
invoked without any arguments, ls lists the files in the current working directory. The
command is also available in the EFI shell. ls only show visible file and folder of the
current directory where ls -al show all file and folder of current directory even if it was
hidden by default.
4. su : The Unix command su, which stands for 'substitute user' (or historically 'superuser'),
is used by a computer user to execute commands with the privileges of another user
account after typing its password. When executed it invokes a shell without changing the
current working directory or the user environment. When the command is used without
specifying the new user id as a command line argument, it defaults to using the
superuser account (user id 0) of the system.
5. whoami : whoami is a command found on most Unix-like operating systems and even
in every Microsoft Windows operating system since Windows Server 2003. It is a
concatenation of the words "Who am I?" and prints the effective username of the current
user when invoked.
9. gedit : gedit is the default text editor of the GNOME desktop environment and part of the
GNOME Core Applications. Designed as a general-purpose text editor, gedit emphasizes
simplicity and ease of use, with a clean and simple GUI, according to the philosophy of
the GNOME project. It includes tools for editing source code and structured text such as
markup languages. To edit file in gedit type gedit <file name / file location with file
name>.
10. nano : GNU nano is a text editor for Unix-like computing systems or operating
environments using a command line interface. It emulates the Pico text editor, part of the
Pine email client, and also provides additional functionality. Unlike Pico, nano is licensed
under the GNU General Public License (GPL). To edit file using nano editor type nano
<file name / file location with file name >. To save and get out of the editor press
ctrl+O enter ctrl+X.
11. wc : wc (short for word count) is a command in Unix and Unix-like operating systems.
The program reads either standard input or a list of computer files and generates one or
more of the following statistics: newline count, word count, and byte count. If a list of files
is provided, both individual file and total statistics follow. To see all stats type wc <file
name>.
12. cp : cp is a command in various Unix and Unix-like operating systems for copying files
and directories. To copy file from one directory to another type cp <file name / file
location with file name> <directory location where the file will be pasted>.
13. mv : mv is a Unix command that moves one or more files or directories from one place to
another. If both filenames are on the same filesystem, this results in a simple file rename
otherwise, the file content is copied to the new location and the old file is removed. To
move file from one directory to another type cp <file name / file location with file
name> <directory location where the file will be pasted>.
17. chmod : In Unix and Unix-like operating systems, chmod is the command and system
call used to change the access permissions and the special mode flags (the setuid,
setgid, and sticky flags) of file system objects (files and directories). Collectively these
were originally called its modes and the name chmod was chosen as an abbreviation of
change mode. There are different level of mode 777 for read, write, execute permission,
444 for read only permission only, 222 for write only permission, 111 for execute only
permission, 000 for no permission and customizable permission by adding 1,2,4.
18. ifconfig : ifconfig (short for interface config) is a system administration utility in Unix-like
operating systems for network interface configuration. ifconfig commonly use to see
active ip addresses of the machine. In latest version of linux ip add and ip route
commands can be used to get all information about active network of users device.
21. wget : GNU wget (or just wget, formerly Geturl, also written as its package name, wget)
is a computer program that retrieves content from web servers. It is part of the GNU
Project. Its name derives from "World Wide Web" and "get." It supports downloading via
HTTP, HTTPS, and FTP. We can download any type of content by typing wget <url of
the content>.