This is a list of linux common CentOS Linux commands and utilities a Bahmni implementer should know for daily system administration.There are There is plenty of materials online that would help you to master these commands and its various options. This list will only tell you what commands you should start looking up.
...
Command | Description | Example | Read More |
---|---|---|---|
ls | List files in current directory | ls - |
...
- touch <file name>
- Create an empty file
...
al | http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ | ||
touch | Creates an empty file | ||
cat | Shows the contents of a file | cat |
...
- man <command name>
- Get help on the “ls” command.
- chmod
- change file access permissions
- chown
- change file owner and group
- chgrp
- change group ownership
- pwd
- Shows the current location in the directory tree
...
hello.txt | |||
man | Show help for a command | man cat | |
chmod | Change the file access permissions to give read/write/execute permissions to a file or files | chmod +x myscript.sh | https://en.wikipedia.org/wiki/Chmod |
chown | Change the file owner / group owner | chown bahmni:bahmni -R /var/www/ | http://www.linfo.org/chown.html |
chgrp | Change the group ownership | ||
grep | Finds matching data in text inputs using regular expressions | cat hello.txt | grep "bahmni" | http://www.thegeekstuff.com/2009/03/15-practical-unix-grep-command-examples/ |
pwd | Shows the current directory path (pwd = present working directory) | ||
cd | Change into the specified directory |
...
cd |
...
/home | |
tail | Display the last few |
...
contents of a text file. |
...
Useful for seeing log files. | tail -f /var/log/openmrs/openmrs.log | http://www.thegeekstuff.com/2009/08/10-awesome-examples-for-viewing-huge-log-files-in-unix/ |
cp | Copies a file from one location to another |
...
cp |
...
abc.txt / |
...
home |
...
mv | Moves a file to |
...
another location. Also used for renaming a file. | mb abc1.txt abc2.txt | |
rm | Delete a file or a directory | rm /tmp/ |
...
hello |
...
...
- mkdir
- Make Directory. Example: mkdir /tmp/myfiles
- rmdir Remove Directory. Example: rmdir /tmp/myfiles/
- find
- It can be used to search for files matching certain patterns, find . -name \*mp3
- ps -ef
- Lists currently running process (programs)
- df
- Report file system disk space usage (“Disk Free” is how I remember it)
- du
- Disk Usage in a particular directory. “du -s” provides a summary for the current directory.
- Clear
- Clear the screen
- ps -ef | grep <application name>
- List <application name> running in the system
...
mkdir | Create a new directory | mkdir music | |
find | Used for searching files matching a certain pattern. Can also be used to execute specific commands on files which match a certain pattern | find -name "*.mp3" | http://www.tecmint.com/35-practical-examples-of-linux-find-command/ |
ps -ef | Print all currently running processes. | ps -ef | grep java | https://www.digitalocean.com/community/tutorials/how-to-use-ps-kill-and-nice-to-manage-processes-in-linux |
df | Print disk space usage (short for 'disk free') | ||
du | Print disk usage report for current directory | du -sh | http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ |
clear | Clear the screen | ||
tar | For creating or extracting tar files -xvf <filename.tar> extract tar file |
...
compress files and folders | http://www.tecmint. |
...
- yum <install/remove> <Application name>
- this is command is used to install or uninstall the programme
- kill
- Terminate a process
- ifconfig
- configure a network interface
- scp
- secure copy (remote file copy program)
...
com/18-tar-command-examples-in-linux/ | |||
yum | Manage installations of RPMs / softwares. | yum install bahmni-emr yum remove bahmni-emr yum info bahmni-emr | https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-yum.html |
kill | Terminate a process / Raise a Signal | kill -9 <pid> | https://www.maketecheasier.com/kill-command-in-linux/ |
ifconfig | Print network configuration / IP of the machine | ||
scp | Secure copy of files (over SSH port) | scp -r foo john@remotehost:/tmp | http://www.hypexr.org/linux_scp_help.php |
chkconfig | Updates and queries runlevel information for system services | https://blog.sleeplessbeastie.eu/2012/07/07/centos-how-to-manage-system-services/ | |
service | Provide information on registered system services. | service |
...
bahmni-emr status service bahmni-emr stop service bahmni-emr start | https://blog.sleeplessbeastie.eu/2012/07/07/centos-how-to-manage-system-services/ | ||
whoami | Prints the details of the current user | ||
useradd | Add user to system | http://www.liquidweb.com/kb/how-to-add-a-user-and-grant-root-privileges-on-centos-6-5/ | |
passwd | Set password of the user | ||
sudo | Run with root privilege | sudo service bahmni-emr stop | https://www.garron.me/en/linux/visudo-command-sudoers-file-sudo-default-editor.html |
ssh | SSH to a remote machine | ssh root@192.133.8.10 | http://support.suso.com/supki/SSH_Tutorial_for_Linux |
ping | Check if a Ping message can be sent over a network | ping www.google.com | |
crontab | Configure cron job (for scheduled tasks) | crontab -L | https://www.pantz.org/software/cron/croninfo.html |
mount | Mount a disk (partition) on a particular path | ||
umount | Un-mount a disk | ||
vi | Editor for files | vi hello.txt | http://www.howtogeek.com/102468/a-beginners-guide-to-editing-text-files-with-vi/ http://www.openvim.com/ (Online VIM tutorial) |
iptables | Firewall on Linux | https://wiki.centos.org/HowTos/Network/IPTables | |
history | List last / all executed commands | ||
top | show processor and memory as being used and other information like running processes | top | http://www.tecmint.com/12-top-command-examples-in-linux/ Further reading : htop : http://www.tecmint.com/install-htop-linux-process-monitoring-for-rhel-centos-fedora/ |
free | gives understanding of total available space of physical memory and swap memory | free -m | http://www.tecmint.com/check-memory-usage-in-linux/ |