Linux Commands Flashcards
ls
List the contents of a directory.
cd
Change the current working directory.
pwd
Print the current working directory.
mkdir
Create a new directory.
rmdir
Remove an empty directory.
rm
Remove files or directories.
cp
Copy files or directories.
mv
Move or rename files or directories.
touch
Create an empty file or update the access and modification times of an existing file.
cat
Concatenate and display files.
less
View the contents of a file one screen at a time.
grep
search for a string in groups of files. When it finds a pattern that matches in more than one file, it prints the name of the file, followed by a colon, then the line matching the pattern.
find
Search for files in a directory hierarchy based on criteria such as name, size, or modification time.
chmod
Change the file permissions.
whoami
Display the username of the current user.
echo
Output text or variables to the terminal or a file.
man / -h
Display the manual page for a specified command or keyword.
su
Switch to another user account or temporarily elevate privileges.
ps
Display information about running processes. single snapshot and does not continuously run.
systemctl
manages both system and service configurations, enabling administrators to manage the OS and control the status of services
sha256sum
Calculate and verify SHA256 checksums for files.
&
Run a command in the background, allowing other tasks to be performed simultaneously.
&&
Execute the next command only if the previous command has succeeded (returned a zero exit status).
>
Redirect standard output from a command to a file, overwriting the file’s existing contents.
> >
Redirect standard output from a command to a file, appending to the file’s existing contents.
top
Display information about running processes. continuous until stopped.
kill
Terminate a process by sending a signal.
tar
Create, extract, or list the contents of a tar archive.
gzip
Compress or decompress files using the gzip format.
ssh
Secure Shell client for remote logins and command execution.