mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:52:43 +00:00 
			
		
		
		
	 6900c4fe29
			
		
	
	
		6900c4fe29
		
	
	
	
	
		
			
			This option, often used with only a lonely dash, allows to "simulate a login". For now, it just changes the current directory to the home of the new user.
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			512 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			512 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ## Name
 | |
| 
 | |
| su - switch to another user
 | |
| 
 | |
| ## Synopsis
 | |
| 
 | |
| ```sh
 | |
| $ su [-] <user>
 | |
| ```
 | |
| 
 | |
| ## Description
 | |
| 
 | |
| `su`: Switch to another user.
 | |
| 
 | |
| When called with no user-specified, `su` defaults to switch to the *root* user. Need to enter the password if the user switch to has one.
 | |
| 
 | |
| ## Options:
 | |
| 
 | |
| * `-`, `-l`, `--login`: Start the shell as it was a real login
 | |
| 
 | |
| ## Arguments
 | |
| 
 | |
| * `user`: User to switch to (defaults to the user with UID 0)
 | |
| 
 | |
| ## Examples
 | |
| 
 | |
| Switch to root user
 | |
| 
 | |
| ```sh
 | |
| $ su
 | |
| ```
 | |
| 
 | |
| Switch to another user
 | |
| 
 | |
| ```sh
 | |
| $ su nona
 | |
| ```
 |