Labels

Showing posts with label M. Show all posts
Showing posts with label M. Show all posts

Mounting a Filesystem

# fuser -km /mnt/hda2
force umount when the device is busy [man]

# mount /dev/hda2 /mnt/hda2
mount disk called hda2 - verify existence of the directory '/ mnt/hda2' [man]

# mount /dev/fd0 /mnt/floppy
mount a floppy disk [man]

# mount /dev/cdrom /mnt/cdrom
mount a cdrom / dvdrom [man]

# mount /dev/hdc /mnt/cdrecorder
mount a cdrw / dvdrom [man]

# mount /dev/hdb /mnt/cdrecorder
mount a cdrw / dvdrom [man]

# mount -o loop file.iso /mnt/cdrom
mount a file or iso image [man]

# mount -t vfat /dev/hda5 /mnt/hda5
mount a Windows FAT32 file system [man]

# mount /dev/sda1 /mnt/usbdisk
mount a usb pen-drive or flash-drive [man]

# mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share
mount a windows network share [man]

# umount /dev/hda2
unmount disk called hda2 - exit from mount point '/ mnt/hda2' first [man]

# umount -n /mnt/hda2
run umount without writing the file /etc/mtab - useful when the file is read-only or the hard disk is full [man]
READ MORE - Mounting a Filesystem

Monitoring and debugging

# free -m
displays status of RAM in megabytes [man]

# kill -9 process_id
force closure of the process and finish it [man]

# kill -1 process_id
force a process to reload configuration [man]

# last reboot
show history reboot [man]

# lsmod
display kernel loaded [man]

# lsof -p process_id
display a list of files opened by processes [man]

# lsof /home/user1
displays a list of open files in a given path system [man]

# ps -eafw
displays linux tasks [man]

# ps -e -o pid,args --forest
displays linux tasks in a hierarchical mode [man]

# pstree
Shows a tree system processes [man]

# smartctl -A /dev/hda
monitoring reliability of a hard-disk through SMART [man]

# smartctl -i /dev/hda
check if SMART is active on a hard-disk [man]

# strace -c ls >/dev/null
display system calls made and received by a process [man]

# strace -f -e open ls >/dev/null
display library calls [man]

# tail /var/log/dmesg
show events inherent to the process of booting kernel [man]

# tail /var/log/messages
show system events [man]

# top
display linux tasks using most cpu [man]

# watch -n1 'cat /proc/interrupts'
display interrupts in real-time [man]
READ MORE - Monitoring and debugging

Microsoft Windows networks (samba)

# mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share
mount a windows network share [man]

# nbtscan ip_addr
netbios name resolution [man]

# nmblookup -A ip_addr
netbios name resolution [man]

# smbclient -L ip_addr/hostname
show remote shares of a windows host [man]

# smbget -Rr smb://ip_addr/share
like wget can download files from a host windows via smb [man]
READ MORE - Microsoft Windows networks (samba)