The purpose of this recommended read is to go over some of the basic, as well as advanced commands that you might use when working on a Linux machine.
Command |
Description |
||||||||||||||||||||||||||||
pwd |
The ‘pwd’ command tells you the path of the ‘present working directory’ that you’re in. The command will return an absolute path, which is a path that always begins at the start of the drive. An example of an absolute path is /home/username. |
|
|||||||||||||||||||||||||||
cd |
Change directories and navigate through the Linux filesystem. It requires either an absolute path or the name of a sub-directory. cd .. (Change directory to the parent directory) |
||||||||||||||||||||||||||||
ls |
List the contents of the current directory. An absolute path can also be used to list the contents within the desired directory. ls -l (Display in a long listing format including permissions, hard links, file/directory ownership, group ownership, size, last modified date, and filename) |
|
|||||||||||||||||||||||||||
cat |
Concatenate files and print on the standard output. This command will join strings together from the given file(s) and print them to the terminal. This command is commonly used to quickly read the content of text files or to copy the contents of a text file to another location/file. cat file1.txt > file2.txt (Will take the output from file1.txt and write them to file2.txt) |
|
|||||||||||||||||||||||||||
cp |
Copy files or directories. Requires you to specify the source file and destination to which you wish to copy the file.
|
|
|||||||||||||||||||||||||||
mv |
Move or rename a file. Requires you to specify the source file and destination (or new name) to which you wish to move the file. |
|
|||||||||||||||||||||||||||
mkdir |
Make a directory. Requires you to specify the name of the directory you wish to create. |
|
|||||||||||||||||||||||||||
rm |
Remove files or directories. Requires you to specify the file you wish to remove.
|
|
|||||||||||||||||||||||||||
touch |
Change file timestamps. The touch command can also be used to create an empty file. Multiple files can be created using one command. |
|
|||||||||||||||||||||||||||
tar |
An archiving utility. Used to create or extract archive files. Requires you to specify the destination archive file, as well as files/directories you wish to add to the archive. tar -cf (The c switch is used to create an archive file, the f switch must be specified to define the name of the archive you wish to create) |
|
|||||||||||||||||||||||||||
chmod |
Change file/directory permissions. The chmod command is typically used along with numbers corresponding to user, group, and others' permissions, though letters can also be used. The +/- symbols along with r,w and x can be used.
|
|
|||||||||||||||||||||||||||
kill |
|
|
|||||||||||||||||||||||||||
kill |
|
|
|||||||||||||||||||||||||||
wget |
|
|
|||||||||||||||||||||||||||
curl |
|
|
|||||||||||||||||||||||||||
uname |
|
|
|||||||||||||||||||||||||||
ps |
|
|
|||||||||||||||||||||||||||
top |
|
|
|||||||||||||||||||||||||||
vi |
|
|
|||||||||||||||||||||||||||
echo |
|
|
|||||||||||||||||||||||||||
su |
|
|
|||||||||||||||||||||||||||
sudo |
|
|
|||||||||||||||||||||||||||
grep |
|
|
|||||||||||||||||||||||||||
find |
|
|
pending
[edited by: Qoosh at 1:14 AM (GMT -7) on 30 Sep 2023]