50 quick linux command tips part 4
==================================
Again, here are another set of quick and brief linux command sample tips.
1. How to you change file ownership and chown files recursively?
# chown user:user folder -R
2. How to view queued mail in sendmail or postfix?
# mailq
3. How to show which alternative binary program does your machine executes first?
# alternatives --display program-name
4. How to create public/private rsa key pair?
# ssh-keygen
5. How to log out from your current shell ssh connection?
# Ctrl+D
If you are using sudo
# exit ; exit
6. How to load a particular kernel modules?
# modprobe modulename
7. How to remove a module from kernel?
# rmmod modulename
8. How to show all loaded kernel modules?
# lsmod
9. What is the configuration file and configuration directory for modprobe?
# cd modprobe.d
# cat /etc/modprobe.conf
10. How to check if cooling mode of your machine is active?
# cat /proc/acpi/thermal_zone/THRM/cooling_mode
11. How to show thermal temperature of a machine based from acpi?
# cat /proc/acpi/thermal_zone/THRM/temperature
12. Alternatively, how to view a JPG image from command line alternatively?
# jiv filename.jpg
13. How to sort a file in reverse mode?
# sort -r file.txt
14. How to close your current windows in one keystroke?
# Ctrl+F4
15. How to list out all detected HAL devices?
# lshal
16. How to extract files from Microsoft's cabinet archives (.cab)?
# cabextract
17. How do to have two eyes following the mouse from screen?
# xeyes
18. How to lock your screen in Gnome using root?
# yum -y install xlockmore
# xlock -mode swarm -count 1
19. How to probe for the modules needed for your hardware monitoring chips to work?
# sensors-detect
20. How to basically build rpm binary package (.rpm) from spec file?
# rpmbuild --ba specfile
(make sure you have the complete build tools and tar ball package in place)
21. How to follow current growth of a log the same way like tail -f ?
# tailf /dir/log filename
23. How to tail 2 or more file in one shot in a single screen?
# yum -y install multitail
# multitail /var/log/file1 /var/log/file2 /var/log/file3
24. How to make a file immutable?
# chattr +i file1
25. How to suid root a file?
# chmod 4755 file
26. How to manage authentication, firewall, network configuration and system service in single screen interface?
# setup
27. How to check mail for your currently logged in user?
# mail
28. How to cut and paste inside a CLI terminal using the mouse without X?
# service gpm start
29. How to replace / delete a character from a string value?
# cat testfile.txt
a
b
c
# tr 'a' 'Z' < testfile.txt
Z
b
c
30. How to create symbolic link of file named linkme?
cd to desired folder where to put the softlink file
# cd /var/www/html
# ln -s /home/myhome/linkme
31. How to create and update new system users in batch mode?
# newusers inputfile.txt
# cat inputfile.txt
user1:password1:1001:1001::/home/user1:/bin/false
user2:password2:1002:1002::/home/user2:/bin/bash
user3:password2:1003:1003::/home/user3:/sbin/nologin
31. How to show which system group a user belongs to?
# groups username
32. How to create a new group?
# groupadd newgroupname
33. How to delete an existing group?
# groupdel newgroupname
34. How to delete a user account including user's home folder files and mail spool?
# userdel -r username
35. Alternatively, how to show currently logged in users?
# users
36. How to unmount CD drive?
# umount /dev/cdrom
37. How to add user account in one shot?
# useradd -d /home/user1 user1 -c "User1 User1" -s /bin/false -G groupname -p cryptpassword
38. How to transfer file via ssh?
# scp -C file1 user@remote-host:user-folder-destination
39. How to transfer and syncronize files/folder between two machines?
# rync -avz files1 user@remote-host:user-folder-destination
40. How to add more system path to current PATH values?
# export PATH:$PATH:/your-new-path:/another-path
41. Alternatively, how to print current login name?
# logname
42. How to clear current terminal screen?
# clear
# Ctrl+L
43. How to go to the first character of a long command from CLI terminal?
# Ctrl+A
44. How to turn on all swap file specifed from /etc/fstab?
# swapon -a
45. How to pause between command execution?
Ex. 3 seconds
# sleep 3
46. How to show detailed Perl version?
# perl -V
47. How to show current spamassassin version?
# spamassassin -V
48. How to get the numeric identifier of current host?
# hostid
49. How to list file and directory contents in a tree-like format?
cd to desired folder
# tree
50. How to show quick history of commands by root?
# history
These document entries are not in any way a rehashed or reaped from any other site. It is also not a replacement or correction to any linux commands, blogs, websites, or any linux man pages or whatsoever. I have them here as blog entries to share my own personal linux reference. The decision to use them from any linux boxes is not mine to keep. Use them with care, use at your own risk.
These linux commands are also available from linux man pages for further reading and study.
# man command
That is all. Have a nice day!
Redhat is a registered trademark by RedHat company.
Subscription
Categories
- HowTos (612)
- Linux Devices (40)
- Linux Diggs (620)
- Linux News (1541)
- Linux Videos (24)
Recent Posts
Blog Archive
-
▼
2007
(340)
-
▼
August
(95)
- KCron - GUI task scheduler
- Linux backups powered by Tar
- INQ7 front page image retrieval
- using wget for data and file transfers
- BibleTime - Bible study from Linux howto
- human readable DVD/CD drive technical details
- sound-juicer - alternative audio CD ripper install
- Stellarium - watch the sky from Linux
- Munin - monitor linux hosts install howto
- blocking yahoo chat messenger
- string manipulation using cut linux command
- graphing skystream DVB receiver's Eb/No and signal...
- BZFlag - 3D multi-player tank game install howto
- screenshot and snapshot creations howtos
- string parsing using bash
- grep multiple character from string or file
- enable and disable of telnet service
- grep multiple strings from a file
- remove spaces from filenames
- ISO creation and CD/DVD burning from terminal
- send a message to user's terminal
- retrieve GMail emails via terminal using fetchmail
- more of activating and deactivating network card
- set new mysql password
- TIP: enable thumbnail display images from apache
- monitor large mailbox users
- using the linux yes command
- string manipulation using tr linux command
- install and play 2D chess game in linux
- more firefox tips and tricks
- recover root password on linux
- establish ssh connection from different port
- uniq linux command
- remove blank lines using grep or sed
- date and time sync via NTP server howto
- who am I
- delete spam email and folder regularly howto
- hello world bash and perl script
- passwordless rdesktop session with XP howto
- force VGA screen resolution and screen mode
- RealPlayer 10 for linux install howto
- Grip - CD ripper install howto
- Banshee - music management and playback
- gnome music applet install howto
- Pirut and yum-updatesd - software management
- Alacarte - editing panel menus install howto
- access NTFS drive in Fedora
- FileLight - graphical disk usage and statistics
- TestDisk- partition tool install howto
- using /dev/null in linux terminal
- yahoo messenger in fedora install howto
- check and repair MS-DOS file systems howto
- using fdformat and mkdosfs from terminal
- Tremulous - Quake 3 install howto
- block consecutive IP address using scripts
- using floppy linux command from terminal
- display word or text file in reversed pattern
- convert a file to equivalent hex/binary code
- spell check text file from terminal
- create screen timer from linux howto
- recreate deleted /dev/null
- harddisk monitoring using smartctl
- bind ssh to selected IP address
- restrict su command to superuser only
- thunderbird install howto
- dovecot POP3/POP3S server with SSL/TLS install howto
- qpopper POP3 server install howto
- my other linux pages
- more ssh log parsing and monitoring
- checking daemon service bash script
- HTML CHM help file viewer install howto
- du - the disk usage linux command howto
- gnome language translator install howto
- display linux memory information howto
- display the number of processor howto
- 3d tabletennis game install howto
- Nokia N70 on Fedora via USB data cable
- Fedora 7 as guest host from VirtualBox
- at - jobs scheduling howto
- Nokia 70 linux connection via bluetooth dongle howto
- crontab - jobs scheduling howto
- managing daemon services howto
- create your own linux OS distro howto
- kernel devel headers install howto
- more multimedia browser plugins install howto
- numlock on with X install howto
- Fedora and RHEL differences
- create virtual terminals with single ssh connection
- virtual CentOS using VMWare 5.5.4 install howto
- VMware workstation 5.5.4 install howto
- 50 quick linux command tips part 4
- 5 SysAds permanent static route story
- ssh log parsing and monitoring
- removable drives, devices and media preferences
- gnome-blog desktop blogging install howto
-
▼
August
(95)
Friday, August 3, 2007
50 quick linux command tips part 4
Subscribe to:
Post Comments (Atom)
ILoveTux - howtos and news | About | Contact | TOS | Policy
0 comments:
Post a Comment