Sunteți pe pagina 1din 6

Utility

Use-Cases

sudo
man
su
service
service
service
service
top
top
mount
umount
fdisk
fdisk
fsck
mkfs
df
du
du
umask
exit
passwd
rpm
rpm
rpm
rpm
yum
yum
yum
yum
yum
yum
up2date
up2date
up2date
up2date
up2date
up2date
vsftpd
vsftpd
vsftpd
lsof
lsof

Run as administrator
Manual / Help file
Switch User
start a service
stop a service
restart a service
start stop restart vsftpd
CPU / Memory / Process details
Kill a rogue process
mount a cdrom
un mount a cdrom
list the filesystem details
work on a DISK
File System Check Utility - Check partition
Format a partition
Disk Filesystem Usage: (human readable form)
Disk Usage: List size of All files/folders beneath
Disk Usage: List sizes UPTO 1 level
display default permission set in /etc/profile
logout of current user
change password
install a standalone rpm package
upgrade a standalone rpm package
remove a standalone rpm package
list packages installed on system
install
upgrade
remove
list packages that need updates
list packages available from sources
list packages installed on system
install
upgrade
remove
list packages that need updates
list package available form sources
install with dependency solved
enable user access on FTP server /etc/vsftpd.conf
enable upload access on FTP /etc/vsftpd.conf
restart vsftpd server
List of opened files - which process -> which file
List of files opened by a process (eg. Dropbox)

tar
tar
tar
crontab
useradd
passwd
useradd
useradd
useradd
useradd
chage
useradd
useradd

backup a directory into a tarball(compressed)


backup a directory (excluding some files)
restore backup (to another directory preferably)
Edit the crontab file - /etc/crontab.conf
Create a new user 'arvind'
unlock the new user 'arvind'
create a user with DIFFERENT HOME Dir.
Create user with specific UID and GUID
Create user with multiple groups
Create user with account expiry date
Verify the age of an account
Create user with password expiry date
Create user with specific SHELL

Command
sudo rpm -i vsftpd
man ping
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 restart
sudo service vsftpd restart
sudo top
run top, press 'k' and enter the PID
mount -t iso9660 /dev/cdrom /mnt/cdrom
umount /mnt/cdrom or umount /dev/cdrom
fdisk -l
fdisk /dev/sda
fsck /dev/sda2
mkfs -V -t vfat /dev/sda2
df -h
du -h
du --max-depth=1 -h
umask -S
exit
passwd
sudo rpm -ivh package.rpm
sudo rpm -Uvh package.rpm
sudo rpm -e package
sudo rpm -qa
yum install package
yum update package
yum remove package
yum list updates
yum list available
yum list installed
up2date -i package
up2date -u package
up2date -l
up2date --show-available
up2date --solvedeps=package
local_enable=yes
write_enable=yes
sudo service vsftpd restart
lsof
lsof -i -n -P | grep dropbox

tar -cvpzf wwwbackup.tar.gz /var/www


tar -cvpzf rootbackup.tar.gz --exclude=/mnt /
tar -xvpzf wwwbackup.tar.gz -C /var/recovery
sudo crontab -e
useradd arvind
passwd arvind
useradd -d /data/projects arvind
useradd -u 1000 -g 501 arvind
useradd -G admins,webadmin,developers arvind
useradd -e 2015-04-30 aparna
chage -l aparna
useradd -f 45 arvind
useradd -s /sbin/csh techmahindra

Comments
use 'q' to exit a man page

CAUTION: partition should be unmounted

beneath pwd

p is very imp. Preserving permissions

# mm hh DoM M DoW cmd


user arvind in locked state
unlocks and prompts your for new password

value of 0 will inactive the account as soon as password in expired

S-ar putea să vă placă și