Linux Terminal Cheat Sheet (Useful for Beginners)

A Linux cheat sheet for beginners (short, sweet, and to the point)

Linux (Useful Commands) Terminal Cheat Sheet

Navigation Commands:

passwd – change password

ls – list directory (Can point at any point on the machine)

-la a fla…


This content originally appeared on DEV Community and was authored by Clean Code Studio

A Linux cheat sheet for beginners (short, sweet, and to the point)

Linux (Useful Commands) Terminal Cheat Sheet

Navigation Commands:

  • passwd - change password
  • ls - list directory (Can point at any point on the machine)
    • -la a flag that lists all + permissions and hidden files
  • pwd - print working directory - check where you're at
  • cd - change directory (Can address at any point in the machine file system)
  • mkdir - make directory
  • rmdir - remove director
  • rm - remove files
  • echo - sends data (if no destination is given than data is sent as output to the terminal)
  • cp copy a file (cp [source] [desintation])
  • mv - mv a file (mv [source] [desintation])
  • locate - locate a file on the machine (locate [filename])
  • updatedb - updates the directory database (must run before running locate)
  • man - manual page of any command
  • grep - search for the following words (can be used to check if a file contains specific info)

Linux is case sensitive so be aware of your capital letters!

  • ./ - your directory right now
  • ../ - previous folder
  • ~ - the users root folder
  • | - pipe the output of one command into another
  • > - use command on the following file (overwrite)
  • >> - use command on following file (appends)

Privilege's and user commands:

  • cat - reads a file to the terminal
  • chmod - changes permissions for a file
  • adduser - make a new user
  • sudo - give root permissions for the following command being executed
  • su - switch user

Network Commands:

  • ifconfig - print network information
  • iwconfig - wireless network information
  • ping - ping an ip address (-c flag lets you define how many times you wish to ping the given ip address)
  • arp -a - send out an arp request to check for machines on the network
  • netstat -a - shows all open ports and what is connected to these ports
  • route - shows a routing table

Viewing, creating, and editing commands:

  • history - lists the 15 commands you entered (history | grep [command] shows all the times you run a command on the machine (including specific syntax))
  • touch - create a file
  • nano - use the nano text editor
  • apt-get - install [program name] - install a program on the machine (can be run without the install)
  • apt install - install a file from the system / kali - server
  • apt purge - program name - (You have to use the * *)
  • pip install - run an installer for local files
  • git clone - clone a github repository (This is a plugin and does not come preinstalled on most linux distributions!)

Webserver Commands:

  • service apache2 start - start a webserver
  • service ssh start - start an ssh server
  • service postgresql start - a service that starts with metasploit
  • service apache2 stop - stops the webserver
  • systemctl enable [program name] - start the service when the machine turns on

Important files/directories in Linux:

  • /etc/passwd - a file that stores all of the users in the system
  • /etc/shadow - stores all of the passwords in the system
  • /var/log/auth.log - authentication reports

Thanks for reading and feel free to follow Clean Code Studio for more!

.ltag__user__id__386677 .follow-action-button { background-color: #339d15 !important; color: #ffffff !important; border-color: #339d15 !important; }
cleancodestudio image

Clean Code Studio
Java Script Design Patterns
Clean Code
[JavaScript Algorithm Examples]


This content originally appeared on DEV Community and was authored by Clean Code Studio


Print Share Comment Cite Upload Translate Updates
APA

Clean Code Studio | Sciencx (2021-08-03T23:55:18+00:00) Linux Terminal Cheat Sheet (Useful for Beginners). Retrieved from https://www.scien.cx/2021/08/03/linux-terminal-cheat-sheet-useful-for-beginners/

MLA
" » Linux Terminal Cheat Sheet (Useful for Beginners)." Clean Code Studio | Sciencx - Tuesday August 3, 2021, https://www.scien.cx/2021/08/03/linux-terminal-cheat-sheet-useful-for-beginners/
HARVARD
Clean Code Studio | Sciencx Tuesday August 3, 2021 » Linux Terminal Cheat Sheet (Useful for Beginners)., viewed ,<https://www.scien.cx/2021/08/03/linux-terminal-cheat-sheet-useful-for-beginners/>
VANCOUVER
Clean Code Studio | Sciencx - » Linux Terminal Cheat Sheet (Useful for Beginners). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/03/linux-terminal-cheat-sheet-useful-for-beginners/
CHICAGO
" » Linux Terminal Cheat Sheet (Useful for Beginners)." Clean Code Studio | Sciencx - Accessed . https://www.scien.cx/2021/08/03/linux-terminal-cheat-sheet-useful-for-beginners/
IEEE
" » Linux Terminal Cheat Sheet (Useful for Beginners)." Clean Code Studio | Sciencx [Online]. Available: https://www.scien.cx/2021/08/03/linux-terminal-cheat-sheet-useful-for-beginners/. [Accessed: ]
rf:citation
» Linux Terminal Cheat Sheet (Useful for Beginners) | Clean Code Studio | Sciencx | https://www.scien.cx/2021/08/03/linux-terminal-cheat-sheet-useful-for-beginners/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.