fbpx

Category content:

Linux Command – (apt-get)(Shutdown)(tree)(which-where)

Linux Command

In this course of Linux commands, we will introduce four Linux Command – (apt-get)(Shutdown)(tree)(which-where):

  • apt-get
  • Shutdown
  • tree
  • which-where
(apt-get):

The apt-get update command updates the list of available packages (programs) that can be downloaded.
*If you type this command as a non-root user, the system will refuse to execute the command because the user does not have the necessary privileges.

> apt-get update -y

> sudo apt-get update -y

let’s to see video from our YouTube channel

(Shutdown):

• The shutdown command allows you to schedule device shutdowns and restarts, sends a warning message, and prevents other users from connecting.
• To use this command, you must have root rights: if you are not logged in as superuser, use Sudo.

To quickly turn off the computer

> Shutting down -h now

• To restart the computer immediately

> Shutdown -r now

• To shut down the system in 30 minutes and notify other users of the action

> shutdown -h -t 30 “Scheduled shut down for maintenance”

 

(tree):

Sometimes it is useful to have an overview of the tree structure of the file system to facilitate navigation between files. We can use the command tree. This command does not install by default. To install it:

> sudo apt-get install tree

> tree

 

To display only directories without the list of filenames:

> tree -d

let’s to see video from our YouTube channel

(which-where):

In this course of Linux commands, we will introduce the command (which-where). We start tutorial by mentioning the structure and example.

In general, executable programs are in one of the following directories: /bin, /usr/bin, /sbin, /usr/sbin, /opt
To locate an application, we use command “which” or “where

> which is “app_name”

> where is “app_name”

let’s to see video from our YouTube channel

 

 

You can find other learning for Linux by clicking here.

Share :
478
keyboard_arrow_up