Linux - Centos 7

Linux - Centos 7

Hi Everyone!

Black-coloured terminal with a lot of text in it used to make me feel very overwhelmed. Lately, I started to learn Linux and fire various commands to get rid of this fear and thought it would be a great idea to share some short notes and commands to get everyone on the same page started.

BASIC COMMANDS

  1. sudo, su - (the command may vary according to the flavour of Linux you are working on) - This command helps to fire commands that need root privileges.

  2. whoami - gives you one-word user name that you have logged as.

  3. id - gives you detailed information about the user you have logged as.

  4. groups -prints the names of the primary and any supplementary groups for each given username.

  5. lastlog - Provided details about the last logins in a detailed way.

  6. Clear - too much happening on the terminal, this command clears the terminal giving you space to think clearly :-P

FILE & DIRECTORY

  1. pwd - (present working directory) - help you where are you currently located in files.

  2. ls - (list) - command will help you get the list of files or subdirectories in the present working directory.

  3. cd - (change directory) - to move inside the directory.

  4. cd .. - you may want to come back to previous directories at times, so this command will move you one step back.

  5. cd / - to go back to the root directory.

  6. mkdir <filename> - to add a directory.

  7. rmdir <filename> - to remove a directory.

  8. touch - To add a file in the directory.

Thanks for reading! :-)