Day-2 Basics of Linux

Jatin VirmaniJatin Virmani
4 min read
    1. What is linux.

Ans Linux is an open-source, Unix-like operating system kernel originally developed by Linus Torvalds in 1991. An operating system kernel is the core component of an operating system that manages hardware resources and provides essential services to software applications.

Linux is known for its stability, security, and flexibility, and it has become widely popular in both the server and desktop computing domains. Its open-source nature allows anyone to view, modify, and distribute its source code, fostering a collaborative development model.

While Linux refers specifically to the kernel, when people talk about "Linux" as an operating system, they usually mean a complete Linux distribution. A Linux distribution, or distro, combines the Linux kernel with various software packages, utilities, libraries, and graphical interfaces to create a complete operating system that users can install and use on their computers.

There are many different Linux distributions available, each with its own characteristics, target audience, and package management systems. Some of the most popular Linux distributions include Ubuntu, Debian, Fedora, CentOS, Arch Linux, and Linux Mint.

  • 2. List of some basic linux commands.

    Ans Here's a list of some basic Linux commands along with brief descriptions:

    1. ls: List directory contents.

      • Example: ls, ls -l (long listing), ls -a (show hidden files), ls -lh (human-readable sizes).
    2. cd: Change directory.

      • Example: cd directory_name, cd .. (move to the parent directory), cd ~ (move to the home directory).
    3. pwd: Print working directory (display the current directory path).

    4. mkdir: Make directory (create a new directory).

      • Example: mkdir directory_name.
    5. rm: Remove files or directories.

      • Example: rm file_name, rm -r directory_name (remove a directory recursively).
    6. cp: Copy files or directories.

      • Example: cp source_file destination_file, cp -r source_directory destination_directory (copy a directory recursively).
    7. mv: Move or rename files or directories.

      • Example: mv old_file new_file, mv file_name new_directory (move a file to a new directory).
    8. touch: Create an empty file or update file timestamps.

      • Example: touch file_name.
    9. cat: Concatenate and display file contents.

      • Example: cat file_name.
    10. more / less: View file contents one screen at a time.

      • Example: more file_name, less file_name.
    11. head / tail: Display the beginning or end of a file.

      • Example: head file_name, tail file_name.
    12. grep: Search for a specific pattern in files.

      • Example: grep pattern file_name, grep -r pattern directory (search recursively in a directory).
    13. chmod: Change file permissions.

      • Example: chmod permissions file_name (e.g., chmod +xscript.sh to add execute permission).
    14. chown: Change file owner and group.

      • Example: chown user:group file_name.
    15. sudo: Execute a command with superuser privileges.

      • Example: sudo command.
    16. df: Display disk space usage.

      • Example: df -h (human-readable output).
    17. du: Display disk usage of files and directories.

      • Example: du -h (human-readable output).
    18. ps: Display information about active processes.

      • Example: ps aux.
    19. kill: Terminate processes.

      • Example: kill process_id.
    20. man: Display the manual page for a command.

      • Example: man command_name.

These are just a few basic Linux commands to get you started. There are many more commands available, each with its own set of options and functionalities. Use the man command followed by the command name to get detailed information about any specific command.

What is the Linux command to

  • Check your present working directory.

  • List all the files or directories including hidden files.

  • To move files from one folder to another folder.

  • To add new user and to update a password.

    Conclusion :-

  • Gaining a foundational understanding of Linux allows you to navigate a powerful and adaptable operating system. Important things to remember are that it is open-source, comes in a variety of distributions, can be customized, communicates via command line, is stable, and offers security advantages. Investigating Linux may lead to a world of computing opportunities and a helpful community, which makes it a great option for both novice and seasoned users looking for efficiency and control over their computer experience.

    Thank You for reading this Article.

0
Subscribe to my newsletter

Read articles from Jatin Virmani directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jatin Virmani
Jatin Virmani