Category: Command Line

Password Deadline

Set deadline for user password chage -E 2008-12-31 user_name

Change User Attributes

Change a user’s attributes usermod -c “User FTP” -g system -d /ftp/user1 -s /bin/nologin user1

Create New User

Create a new user belongs “admin” group called ‘user1’ useradd -c “Name Surname ” -g admin -d /home/user1 -s /bin/bash…

Package Listing in Debian

Show space used by deb packages installed sorted by size (ubuntu, debian and like) dpkg-query -W -f='{Installed-Size;10}t{Package}n’ | sort -k1,1n

Rename an User Group

Rename a group groupmod -n new_group_name old_group_name

Set Time

Set date and time – MonthDayhoursMinutesYear.Seconds date 041217002007.00

Full Year Calendar

Show the calendar of 2008 cal 2008

Show Interrupts

Show interrupts cat /proc/interrupts

Remove a Folder from Git

Remove a given folder from a Git repository… git rm -r cache/

Show file swap

show file(s) swap cat /proc/swaps