DEV Community

viyashdoss
viyashdoss

Posted on

CLI - commands and their uses

1)What is the difference between Service and Application?

  • Service(API) is a kind of work/process which is mostly used by other programs, whereas Application(Software) is a service offered to the user or any other application to manage the process/work.



2)What are these wildcards ~, ., .., * and ??

  • Wildcards are special characters which are used to ease the search process. It is used for identifying multiple items but not identical data.
    • ~ Home directory
    • . Current working directory
    • .. Prev to the current directory
    • * Any number of characters.



3)What are the different flags for the kill? Why do we use kill -9 in general?

  • Kill command is used to kill the process in Linux systems but also we can use it to halt/interrupt/continue the process. To do that we can use the command

kill SignalName/ID PID

Image description




4)Are you clear about file permissions? Explain them. chmod and chown commands?

  • CHMOD cmd is used to alter the permission(Read, Write, Execute) of the file. Two different ways of representation.

    • Absolute - CHMOD 755 file.txt
    • Symbolic - CHMOD a=rwx file.txt
  • CHOWN cmd is used to update the user/group of the file.

    • To update the user - Sudo CHOWN user filename
    • To update user & group - Sudo CHOWN user: group filename



5)Usage of Ctrl+R to search previously run commands, arrow keys and tab autocompletion.

  • Tab - Autocomplete the word based on what we have typed.
  • Arrow Keys - up/down keys Navigate to frequently used commands.
  • CTRL+R - It's like a search box to find the previously ran command.

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs