One Day One Cmd

Place for playing with commands…

Day 58: $ sudo

ODOC: sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. The real and effective uid and gid are set to match those of the target user, as specified in the password database, and the group vector is initialized based on the group database.

Ex: -$ sudo fdisk -l
After entering this command in terminal; it will wait for password, then the command which work followed by the sudo.

fdisk -l command is used to display the number of disk partitions in our system

bala@bala:~/Desktop $ sudo fdisk -l
[sudo] password for bala:
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d4c97

 Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       24899   199998465    5  Extended
/dev/sda2           24899       25024     1000448   82  Linux
                                                        swap/Solaris
/dev/sda3   *       25024       30402    43198464   83  Linux
/dev/sda5            6225       12450    49998848   83  Linux
/dev/sda6           12450       18675    49998848   83  Linux
/dev/sda7           18675       24899    49998848   83  Linux
/dev/sda8               1        6225    49998848   83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 4016 MB, 4016046080 bytes
124 heads, 62 sectors/track, 1020 cylinders
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: