© 2026 Khalid Mesbah. All rights reserved.

    Made with(1 28√e 980)
    Magic Lamp
    🏠Home👤About🛠️Services💼Projects📝Blog
    🏠Home👤About🛠️Services💼Projects📝Blog🏆Certifications📦Uses📞Contact
    - Linux commands- I know- Piping / chaining- Running multiple commands at once- The find command- Redirection- Sudo
    Back To Home
    notes
    1 min readOctober 29, 2026

    linux commands

    linux

    i know

    • killall terminate a program, not the best so you can check bpytop
    • touch create a file, modify the access time of a file
    • which where a program is
    • ping test network
    • less <file> or cat <file> | more better than cat when creating long files
    • sudo blkid list all the devices on a machine, find the uuid for a device
    • sudo -s act as a root for some time instead of typing sudo every time
    • su <user> change user
    • sudo allows us to act as the root user

    Piping / chaining

    ls | cat allowing the standard output from the ls command to be the standard input for the cat command e.g: cat contacts.txt | sort | uniq | grep something

    running multiple commands at once

    1. using ; run both commands
    2. using && run the second command if the first succeeds
    3. using || run the second command if the first fails

    e.g: mkdir hi && cd hi

    the find command

    find <locationToSearch>

    redirection

    Redirecting the output into a file

    echo hi > hi.txt overwrite redirection echo hi >> hi.txt append redirection e.g: sort < contacts.txt > sorted-contacts.txt

    sudo

    sudo !! Run sudo to the previous command