Difference between revisions of "Linux Notes"
From OpenEMR Project Wiki
(→Client) |
|||
Line 137: | Line 137: | ||
==Miscellaneous Commands== | ==Miscellaneous Commands== | ||
<pre style="font-size: 130%; margin: 0 2em 0 2em;"> | |||
sudo reboot | |||
</pre> | |||
<br><br> | <br><br> |
Revision as of 19:58, 26 May 2014
General
Text Editors - Command Line
vim
- Highest learning curve, most powerful.
- vi Editor Commands
nano
- Derived from pico, more features than pico, easier to use than vim.
- Control-Y = Page Up. Control-V = Page Down.
emacs
jed
- Menu based text editor. Yes, menus in the command line!
Mail Readers - Command Line
mutt
Viewing Files
less [FILENAME]
FTP Servers
vsftp
- Config File: /etc/vsftpd.conf
- After Config Changes: sudo etc/init.d/vsftpd restart
- File with a list of users that are NOT allowed FTP access: /etc/ftpusers
- Configuration File Settings
local_enable=YES | Allow Authentication of Users |
write_enable=YES | Allow Upload of Files |
chroot_local_user=YES | Limit users to their home directory. |
chroot_list_enable=YES | Limit a list of users to their home directories. |
chroot_list_file=/etc/vsftpd.chroot_list | Location of the list of users to limit. |
ssl_enable=Yes | Enable FTP over SSL (FTPS). |
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem | Location of SSL Certificate. |
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key | Location of SSL Key. |
proftpd
NFS File Server
Server
- The Linux Documentation Project -- NFS How To
- Package: nfs-kernel-server
- Configure the Directories to be Exported by adding them to:
- /etc/exports
- Exports File Configuration Examples:
/ubuntu *(ro,sync,no_root_squash) /home *(rw,sync,no_root_squash) /home 192.168.1.0/255.255.255.0(rw,no_subtree_check,no_root_squash,sync,insecure)
Client
- Package: nfs-common
- Create a Mount Point: sudo mkdir -p /mnt/NFS/home
- Mount Shared Directory: sudo mount -t nfs -o resvport 192.168.1.1:/home /mnt/NFS/home
- Unmount Shared Directory: sudo umount /mnt/home
SSH Server
Configure
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.default sudo chmod a-w sshd_config.default sudo nano /etc/ssh/sshd_config [Change: PasswordAuthentication yes] sudo restart ssh
Directory Structure
bin | Essential user command binaries. |
boot | Static files of the boot loader. |
cdrom | |
dev | Device files. |
etc | Host-specific CONFIGURATION files, i.e. preferences. |
Startup, shutdown, start, stop scripts for every individual program. | |
home | User home directories. |
lib | Essiential shared libraries and kernel modules. |
media | Mount point for removable media. |
mnt | Mount point for a temporarily mounted filesystem. |
opt | Add-on application software packages. |
proc | Process information. Virtual filesystem documentation kernel and process status as text files. |
root | Home directory for the root user. |
run | |
sbin | System binaries. |
srv | Data for services provided by the system. |
sys | |
usr | Multi-user utilities & applications. |
var | Variable files. The contents of the files here is expected to grow. |
Contains log, lock, spool, mail, and temp files. | |
Miscellaneous Commands
sudo reboot