Skip to main content

Linux Command Line

When working with High-Performance Computing (HPC) systems in Linux, there are several basic commands that are commonly used. Here are some of the essential commands:

  1. pwd: Print the current working directory. It displays the path of the current directory you are in.

    pwd
  2. ls: List the contents of a directory. It displays the files and directories in the current working directory.

    ls
  3. cd: Change directory. Use cd followed by the directory path to navigate to a specific directory.

    cd /path/to/dir
  4. mkdir: Create directories. Use mkdir followed by the directory name to create a new directory.

    mkdir
  5. touch: Create a new empty file.

    touch
  6. mv: Move or rename files and directories. It can be used to move files or directories from one location to another or rename them.

    mv
  7. cp: Copy files and directories. You can use cp to create a copy of a file or directory.

    cp
  8. rm: Remove files and directories. This command is used to delete files and directories. Be cautious when using it, as deleted files are not recoverable.

    rm
  9. man: Display page manual for the command.

    man
  10. cat: Display file content. It is used to print the contents of a file on the console.

    cat filename
  11. nano or vi: Text editors for creating or modifying files. You can use either nano or vi to edit text files directly from the command line.

    nano filename
  12. scp: Transferring files to HPC Clusters from a Mac/Linux.

    scp filename username@cluster:~
  13. ssh: Secure Shell (SSH) is used to connect to remote HPC systems. You can use the ssh command followed by the remote server's IP address or hostname to establish a secure shell connection.

    ssh nautilus

These are just a few basic commands, but there are many more available in Linux for various purposes. It's also worth mentioning that some HPC systems may have additional commands or utilities specific to their setup or configuration.