Linux Commands
These are the commands I tend to use on Linux servers, such as eevee in CSBL.
EEVEE has the unique ability to evolve into eight different creatures: Sylveon, Umbreon, Espeon, Leafeon, Glaceon, Vaporeon, Jolteon, or Flareon.
1. cd (change directory)
examples :
cd ..
: Move to the parent directory.cd ~
: Move to the home directory.cd -
: Move to the previous directory.
2. mkdir (make directory)
options :
-p
: Create parent directories as needed.
examples :
mkdir [folder]
: Creat a directory namedfolder
.mkdir -p [parent]/[child]
: Create thechild
directory along with theparent
if it doesn’t exist.
3. rm (remove)
options :
-r
: Recursively delete directories and their contents.-f
: Force deletion without confirmation.-i
: Prompt before deleting.
examples :
rm [file.txt]
: Deletefile.txt
.rm -rf [folder]
: Forcefully delete thefolder
directory and its contents
4. rmdir (remove directory)
options :
--ignore-fail-on-non-empty
: Ignore errors if the directory is not empty.
examples :
rmdir [empty_folder]
: Remove an empty directory namedempty_folder
5. mv (move, or rename files or directories)
options :
-i
: Prompt before overwriting files.-u
: Move only newer files.-v
: Show details of the operation.
examples :
mv [file.txt] /destination/
: Movefile.txt
to thedestination
directorymv [old_name.txt] [new_name.txt]
: Renameold_name.txt
tonew_name.txt
6. ls (list directory contents)
options :
-a
: Show all files, including hidden ones.-l
: Display detailed file information (permissions, owner size, modification time).-h
: Display sizes in a human-readable format.-R
: Recursively list subdirectories.
examples :
ls -alh
: Show all files, detailed information, and sizes in a human-readable format.
7. cat (concatenate)
options :
-n
: Display line numbers.-E
: Show$
at the end of each line.
examples :
cat [file.txt]
: Display the contents offile.txt
.cat [file1.txt] [file2.txt] > [merged_file.txt]
: Merge two files into one.cat -n [file.txt]
: Display the contents offile.txt
with line numbers.
8. nano
options :
-m
: Enable mouse support-v
: Open files in read-only mode.-B
: create a backup of the file.-C [directory]
: Save backup files in a specific directory.
examples :
nano [file.txt]
: Openfile.txt
for editing.nano -v [file.txt]
: Openfile.txt
in read-only mode.nano -m [file.txt]
: Enable mouse support while editingfile.txt
.
9. python 3
options :
-v
or--version
: Check the Python version.-c [code]
: Execute a single line of Python code.-m [module]
: Run a specific Python module.--help
: Display help for Python commands.
examples :
python3 -v
: Check the Python 3 version.python3 -c "print('Hello World!)"
: Execute a single line of code.python3 [script.py]
: Run thescript.py
file.
This post is licensed under CC BY 4.0 by the author.