Sobes.tech
Junior

Name the basic Linux commands.

sobes.tech AI

Answer from AI

  • Basic Linux commands ls - list files and directories. cd - change current directory. pwd - print current working directory. mkdir - create a directory. rmdir - remove an empty directory. rm - delete files or directories. cp - copy files or directories. mv - move or rename files/directories. cat - display file contents, concatenate files. less / more - page through files. head - display the first lines of a file. tail - display the last lines of a file. grep - search for lines matching a pattern. find - search for files and directories. chmod - change permissions. chown - change file owner. ps - view running processes. top - monitor system and process load. kill - terminate processes. ssh - remote connection. scp - secure copy over network. wget / curl - download files from the internet. man - view command manual. echo - display text. date - show or set date and time. df - view free disk space. du - view disk space usage. tar - archive and extract files. gzip / gunzip - compress and decompress files.

  • Primary usage of commands:

    # List files
    ls -l
    
    # Change directory to Documents
    cd Documents
    
    # Create a new directory named NewFolder
    mkdir NewFolder
    
    # Copy file index.html to backup directory
    cp index.html backup/
    
    # Search for lines containing "error" in application.log
    grep "error" application.log
    
    # Display the first 10 lines of config.txt
    head config.txt
    
    # Set execute permissions on a script
    chmod +x my_script.sh
    
Name the basic Linux commands. — QA / QA Automation - sobes.tech