O'Reilly logo

Korn Shell: Unix and Linux Programming Manual, Third Edition, The by Anatole Olczak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The newgrp Command

The newgrp command changes the group id and is equivalent to 'exec /bin/newgrp group'. In this example, the group id is changed from users to networks:

					$ id
					uid=100(anatole) gid=101(users)
					$ newgrp networks
					uid=100(anatole) gid=12(networks)
				

Without arguments, newgrp resets the group-id to the default:

					$ newgrp
					uid=100(anatole) gid=101(users)
				

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required